code: def _get_span_custom_property(artifact: types.Artifact) -> int:
      # For backward compatibility, span may be stored as a string.
      str_span = artifact.get_string_custom_property(_SPAN)
      if str_span:
          return int(str_span)
      return artifact.get_int_custom_property(_SPAN)
  
file_path: tfx/tfx/dsl/input_resolution/strategies/span_range_strategy.py
imports: from typing import Dict, List, Optional, Any
  from tfx import types
  from tfx.dsl.components.common import resolver
  from tfx.utils import doc_controls
  import ml_metadata
label_desc: Use image node_id 1 for calling a global function with example usage: _get_span_custom_property(artifact) and returns: artifact, int