code: def normalize_table_function_result(it):
      def normalize_one_row(value):
          if isinstance(value, tuple):
              # We assume that tuple is a single line output
              return [*value]
          elif isinstance(value, Row):
              # We assume that tuple is a single line output
              return value._values
          else:
              # single field value
              return [value]
  
      if it is None:
  
          def func():
              for i in []:
                  yield i
  
          return func()
  
      if isinstance(it, (list, range, Generator)):
  
          def func():
              for item in it:
                  yield normalize_one_row(item)
  
          return func()
      else:
  
          def func():
              yield normalize_one_row(it)
  
          return func()
  
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 1 for calling a global function with example usage: normalize_table_function_result(it) and returns: func, func, func, list, value, list