code: def construct_program_args(args):
      parser = argparse.ArgumentParser()
      parser.add_argument("-c", "--class", required=True)
      parser.add_argument(
          "cluster_type", choices=["local", "remote", "yarn"]
      )
      parse_result, other_args = parser.parse_known_args(args)
      main_class = getattr(parse_result, "class")
      cluster_type = parse_result.cluster_type
      return namedtuple(
          "ProgramArgs", ["main_class", "cluster_type", "other_args"]
      )(main_class, cluster_type, other_args)
  
imports: import argparse
  import getpass
  import glob
  import os
  import platform
  import signal
  import socket
  import sys
  from collections import namedtuple
  from string import Template
  from subprocess import Popen, PIPE
  from pyflink.find_flink_home import _find_flink_home, _find_flink_source_root
label_desc: Use image node_id 10 for calling a global function with example usage: construct_program_args(args) and returns: namedtuple