tfx.orchestration.portable.mlmd.context_lib.register_contexts_if_not_exists

Creates or fetches the contexts given specification.

metadata_handler A handler to access MLMD store.
node_contexts A pipeline_pb2.NodeContext message that instructs registering of the contexts.

A list of metadata_store_pb2.Context messages.