code: def _make_zero_padding_spec_value(
      spec_full_regex: str, pattern: str, spec_value: int
  ) -> str:
      """Returns spec value, applies zero padding if needed."""
      match_result = re.search(spec_full_regex, pattern)
      assert match_result, "No %s found in split %s" % (
          spec_full_regex,
          pattern,
      )
      width_str = match_result.group("width")
      if width_str:
          width_int = 0
          try:
              width_int = int(width_str)
          except ValueError:
              raise ValueError(
                  "Width modifier is not a integer: %s" % pattern
              )
          if width_int <= 0:
              raise ValueError(
                  "Width modifier is not positive: %s" % pattern
              )
          if width_int < len(str(spec_value)):
              raise ValueError(
                  "Spec width is less than number of digits in spec: (%s, %s)"
                  % (width_int, spec_value)
              )
          return str(spec_value).zfill(width_int)
      return str(spec_value)
  
imports: import datetime
  import os
  import re
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  from absl import logging
  import numpy
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
  from tfx.utils import io_utils
  from google.protobuf import json_format
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
label_desc: Use image node_id 9 for calling a global function with example usage: _make_zero_padding_spec_value(spec_full_regex, pattern, spec_value) and returns: str, str