class_docstr: MLMD mixins for testing ResolverOps and resolver functions.
class_docstr_tok: ["MLMD","mixins","for","testing","ResolverOps","and","resolver","functions","."]
docstr: Build Examples artifacts and add an ExampleGen execution to MLMD.
code: def create_examples(
      self,
      spans_and_versions: Sequence[Tuple[int, int]],
      contexts: Sequence[metadata_store_pb2.Context] = (),
  ) -> List[types.Artifact]:
      """Build Examples artifacts and add an ExampleGen execution to MLMD."""
      examples = []
      for span, version in spans_and_versions:
          examples.append(
              self.prepare_tfx_artifact(
                  Examples,
                  properties={"span": span, "version": version},
              )
          )
      self.put_execution(
          "ExampleGen",
          inputs={},
          outputs={"examples": self.unwrap_tfx_artifacts(examples)},
          contexts=contexts,
      )
      return examples
  
imports: from typing import Type, Any, Dict, List, Optional, Sequence, Tuple, Union, Mapping
  from unittest import mock
  from absl.testing import parameterized
  from tfx import types
  from tfx.dsl.compiler import compiler_context
  from tfx.dsl.compiler import node_inputs_compiler
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import channel
  from tfx.types import component_spec
  from tfx.utils import test_case_utils
  from tfx.utils import typing_utils
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 4 for calling the ResolverTestCase obj's underlying member method code with example usage: obj.create_examples(spans_and_versions, contexts) and returns: examples