code: def _get_custom_split_pattern(
      examples: types.Artifact, split: str
  ) -> Optional[str]:
      """Get a custom split file pattern for a split if set, or None."""
      if not examples.has_custom_property(
          CUSTOM_SPLIT_PATTERN_PROPERTY_NAME
      ):
          return None
      custom_split_patterns = json.loads(
          examples.get_string_custom_property(
              CUSTOM_SPLIT_PATTERN_PROPERTY_NAME
          )
      )
      if split not in custom_split_patterns:
          raise ValueError(
              "Missing split %s for artifact with custom split pattern properties"
              % split
          )
      return os.path.join(examples.uri, custom_split_patterns[split])
  
file_path: tfx/tfx/components/util/examples_utils.py
imports: import json
  import os
  from typing import Dict, List, Optional, Tuple
  from absl import logging
  from tfx import types
  from tfx.components.example_gen import utils
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.utils import io_utils
label_desc: Use image node_id 7 for calling a global function with example usage: _get_custom_split_pattern(examples, split) and returns: os, None