code: def _tfx_artifact(
      uri: str,
      artifact_id: Optional[int] = None,
      type_id: Optional[int] = None,
      custom_properties: Optional[Dict[str, str]] = None,
  ) -> types.Artifact:
      artifact = _DEFAULT_ARTIFACT_TYPE()
      artifact.uri = uri
      artifact.is_external = False
      if artifact_id is not None:
          artifact.id = artifact_id
      if type_id is not None:
          artifact.type_id = type_id
      if custom_properties:
          for key, value in custom_properties.items():
              artifact.set_string_custom_property(key, value)
      return artifact
  
imports: from typing import Dict, Mapping, Optional, Sequence
  from absl.testing import parameterized
  import tensorflow
  from tfx import types
  from tfx.orchestration.portable import merge_utils
  from tfx.orchestration.portable import outputs_utils
  from tfx.types import standard_artifacts
  from tfx.utils import test_case_utils
  from tfx.utils import typing_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _tfx_artifact(uri, artifact_id, type_id, custom_properties) and returns: artifact