code: def range_config_generator(
      input_date: tfx.dsl.components.Parameter[str],
      range_config: tfx.dsl.components.OutputArtifact[
          tfx.types.standard_artifacts.String
      ],
  ):
      """Implements a function-based TFX component to convert date into a span number for downstream use by ExampleGen.
  
      Args:
        input_date: input date to generate range_config.
        range_config: range_config to ExampleGen.
      """
      date = datetime.datetime.strptime(input_date, "%Y%m%d")
      range_config_str = proto_utils.proto_to_json(
          tfx.proto.RangeConfig(
              static_range=tfx.proto.StaticRange(
                  start_span_number=utils.date_to_span_number(
                      1970, 1, 1
                  ),
                  end_span_number=utils.date_to_span_number(
                      date.year, date.month, date.day
                  ),
              )
          )
      )
      range_config.value = range_config_str
  
imports: import datetime
  import os
  from typing import List
  from kfp.pipeline_spec import pipeline_spec_pb2
  import tensorflow_model_analysis
  from tfx import v1
  from tfx.components.example_gen import utils
  from tfx.components.trainer.executor import Executor
  from tfx.dsl.component.experimental import executor_specs
  from tfx.dsl.component.experimental import placeholders
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import base_node
  from tfx.dsl.components.base import executor_spec
  from tfx.types import channel_utils
  from tfx.types import component_spec
  from tfx.types.experimental import simple_artifacts
  from tfx.utils import proto_utils
  from google.protobuf import message
label_desc: Use image node_id 2 for calling a global function with example usage: range_config_generator(input_date, range_config) without return types