code: def main():
      import builtins
      import logging
      from functools import partial
  
      # redirect stdout to logging.info, stderr to logging.error
      _info = logging.getLogger().info
      _error = logging.getLogger().error
      sys.stdout.write = partial(print_to_logging, _info)
      sys.stderr.write = partial(print_to_logging, _error)
  
      custom_print = CustomPrint(print)
      builtins.print = custom_print.print
      # Remove all the built-in log handles
      logging.getLogger().handlers = []
      apache_beam.runners.worker.sdk_worker_main.main(sys.argv)
      custom_print.close()
  
file_path: flink/flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py
imports: import sys
  import pyflink.fn_execution.beam.beam_operations
  import pyflink.fn_execution.beam.beam_coders
  import apache_beam.runners.worker.sdk_worker_main
  from apache_beam.runners.worker import sdk_worker
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types