code: def _parse_constant_value(constant_value) -> Tuple[str, Any]:
      j_type = constant_value[0]
      serializer = PickleSerializer()
      pickled_data = serializer.loads(constant_value[1:])
      # the type set contains
      # TINYINT,SMALLINT,INTEGER,BIGINT,FLOAT,DOUBLE,DECIMAL,CHAR,VARCHAR,NULL,BOOLEAN
      # the pickled_data doesn't need to transfer to anther python object
      if j_type == 0:
          parsed_constant_value = pickled_data
      # the type is DATE
      elif j_type == 1:
          parsed_constant_value = datetime.date(
              year=1970, month=1, day=1
          ) + datetime.timedelta(days=pickled_data)
      # the type is TIME
      elif j_type == 2:
          seconds, milliseconds = divmod(pickled_data, 1000)
          minutes, seconds = divmod(seconds, 60)
          hours, minutes = divmod(minutes, 60)
          parsed_constant_value = datetime.time(
              hours, minutes, seconds, milliseconds * 1000
          )
      # the type is TIMESTAMP
      elif j_type == 3:
          parsed_constant_value = datetime.datetime(
              year=1970, month=1, day=1, hour=0, minute=0, second=0
          ) + datetime.timedelta(milliseconds=pickled_data)
      else:
          raise Exception(
              "Unknown type %s, should never happen" % str(j_type)
          )
  
      def _next_constant_num():
          global _constant_num
          _constant_num = _constant_num + 1
          return _constant_num
  
      constant_value_name = "c%s" % _next_constant_num()
      return constant_value_name, parsed_constant_value
  
imports: import datetime
  import threading
  import time
  from collections.abc import Generator
  from functools import partial
  from typing import Any, Tuple, Dict, List
  from pyflink.common import Row
  from pyflink.fn_execution import pickle
  from pyflink.serializers import PickleSerializer
  from pyflink.table import functions
  from pyflink.table.udf import DelegationTableFunction, DelegatingScalarFunction, ImperativeAggregateFunction, PandasAggregateFunctionWrapper
label_desc: Use image node_id 7 for calling a global function with example usage: _parse_constant_value(constant_value) and returns: constant_value_name,  parsed_constant_value, _constant_num