class_docstr: Definition for TFX Importer.
  
  The Importer is a special TFX node which registers an external resource into
  MLMD so that downstream nodes can use the registered artifact as an input.
  
  Here is an example to use the Importer:
  
  ```
  importer = Importer(
      source_uri='uri/to/schema',
      artifact_type=standard_artifacts.Schema,
      reimport=False).with_id('import_schema')
  schema_gen = SchemaGen(
      fixed_schema=importer.outputs['result'],
      examples=...)
  ```
docstr: Init function for the Importer.
  
  Args:
    source_uri: the URI of the resource that needs to be registered.
    artifact_type: the type of the artifact to import.
    reimport: whether or not to re-import as a new artifact if the URI has
      been imported in before.
    properties: Dictionary of properties for the imported Artifact. These
      properties should be ones declared for the given artifact_type (see the
      PROPERTIES attribute of the definition of the type for details).
    custom_properties: Dictionary of custom properties for the imported
      Artifact. These properties should be of type Text or int.
    output_key: The key to use for the imported artifact in the Importer's
      output dictionary. Defaults to 'result'.
docstr_tok: ["Init","function","for","the","Importer",".","Args",":","source_uri",":","the","URI","of","the","resource","that","needs","to","be","registered",".","artifact_type",":","the","type","of","the","artifact","to","import",".","reimport",":","whether","or","not","to","re-import","as","a","new","artifact","if","the","URI","has","been","imported","in","before",".","properties",":","Dictionary","of","properties","for","the","imported","Artifact",".","These","properties","should","be","ones","declared","for","the","given","artifact_type","(","see","the","PROPERTIES","attribute","of","the","definition","of","the","type","for","details",")",".","custom_properties",":","Dictionary","of","custom","properties","for","the","imported","Artifact",".","These","properties","should","be","of","type","Text","or","int",".","output_key",":","The","key","to","use","for","the","imported","artifact","in","the","Importer's","output","dictionary",".","Defaults","to","'result","'","."]
code: def __init__(
      self,
      source_uri: str,
      artifact_type: Type[types.Artifact],
      reimport: Optional[bool] = False,
      properties: Optional[Dict[str, Union[str, int]]] = None,
      custom_properties: Optional[Dict[str, Union[str, int]]] = None,
      output_key: Optional[str] = None,
  ):
      """Init function for the Importer.
  
      Args:
        source_uri: the URI of the resource that needs to be registered.
        artifact_type: the type of the artifact to import.
        reimport: whether or not to re-import as a new artifact if the URI has
          been imported in before.
        properties: Dictionary of properties for the imported Artifact. These
          properties should be ones declared for the given artifact_type (see the
          PROPERTIES attribute of the definition of the type for details).
        custom_properties: Dictionary of custom properties for the imported
          Artifact. These properties should be of type Text or int.
        output_key: The key to use for the imported artifact in the Importer's
          output dictionary. Defaults to 'result'.
      """
      self._source_uri = source_uri
      self._reimport = reimport
      self._output_key = output_key or IMPORT_RESULT_KEY
  
      artifact = artifact_type()
      artifact.is_external = True
      _set_artifact_properties(artifact, properties, custom_properties)
  
      output_channel = types.OutputChannel(
          artifact_type,
          producer_component=self,
          output_key=self._output_key,
          additional_properties=properties,
          additional_custom_properties=custom_properties,
      )
  
      # TODO(b/161490287): remove static artifacts.
      output_channel.set_artifacts([artifact])
      self._output_dict = {self._output_key: output_channel}
  
      super().__init__(driver_class=ImporterDriver)
  
imports: from typing import Any, Dict, List, Optional, Type, Union
  import absl
  from tfx import types
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.components.base import base_node
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.types import channel_utils
  from tfx.utils import doc_controls
  from ml_metadata import errors
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new Importer object from inherited base classes: base_node with example: obj = Importer(source_uri, artifact_type, reimport, properties, custom_properties, output_key)