code: def RangeConfigGenerator(
      input_date: tfx.dsl.components.Parameter[str],
      range_config: tfx.dsl.components.OutputArtifact[
          tfx.types.standard_artifacts.String
      ],
  ):
      """Implements the custom component to convert date into span number.
  
      Args:
        input_date: input date to generate range_config.
        range_config: range_config to ExampleGen.
      """
      start_time = datetime.datetime(
          2022, 1, 1
      )  # start time calculate span number from.
      datem = datetime.datetime.strptime(input_date, "%Y%m%d")
      span_number = (
          datetime.datetime(datem.year, datem.month, datem.day)
          - start_time
      ).days
      range_config_str = proto_utils.proto_to_json(
          tfx.proto.RangeConfig(
              static_range=tfx.proto.StaticRange(
                  start_span_number=span_number,
                  end_span_number=span_number,
              )
          )
      )
      range_config.value = range_config_str
  
file_path: tfx/tfx/examples/penguin/penguin_pipeline_local.py
imports: import datetime
  import multiprocessing
  import os
  import socket
  import sys
  from typing import List, Optional
  import absl
  from absl import flags
  import tensorflow_model_analysis
  from tfx import v1
  from tfx.utils import proto_utils
label_desc: Use image node_id 1 for calling a global function with example usage: RangeConfigGenerator(input_date, range_config) without return types