code: def parse_flags(
      argv: List[str],
  ) -> Tuple[argparse.Namespace, List[str]]:
      """Parses command line arguments.
  
      # pylint: disable=line-too-long
      Args:
        argv: Unparsed arguments for run_executor.py
          --executor_class_path: Python class of executor in format of
            <module>.<class>.
          --temp_directory_path: Common temp directory path for executors.
          --inputs: JSON serialized dict of input artifacts.  If the input needs to
            be base64-encoded, use --inputs-base64 instead.
          --inputs-base64: base64-encoded JSON serialized dict of input artifacts.
            If the input is not base64-encoded, use --inputs instead.
          --outputs: JSON serialized dict of output artifacts.  If the output needs
            to be base64-encoded, use --outputs-base64 instead.
          --outputs-base64: base64-encoded JSON serialized dict of output artifacts.
            If the output is not base64-encoded, use --outputs instead.
          --exec_properties: JSON serialized dict of (non artifact) execution
            properties.  If the execution properties need to be base64-encoded, use
            --exec_properties-base64 instead.
          --exec_properties-base64: base64-encoded JSON serialized dict of (non
            artifact) execution properties.  If the execution properties are not
            base64-encoded, use --exec_properties instead.
          --write_outputs_stdout: Write outputs to last line of stdout, which will
            be pushed to xcom in Airflow. Please ignore by other users or
            orchestrators.
      # pylint: disable=line-too-long
  
      Returns:
        None
  
      Raises:
        None
      """
  
      parser = argparse_flags.ArgumentParser()
      parser.add_argument(
          "--executor_class_path",
          type=str,
          required=True,
          help="Python class of executor in format of <module>.<class>.",
      )
      parser.add_argument(
          "--temp_directory_path",
          type=str,
          help="common temp directory path for executors",
      )
      inputs_group = parser.add_mutually_exclusive_group(required=True)
      inputs_group.add_argument(
          "--inputs",
          type=str,
          help="json serialized dict of input artifacts.",
      )
      inputs_group.add_argument(
          "--inputs-base64",
          type=str,
          help="base64 encoded json serialized dict of input artifacts.",
      )
  
      outputs_group = parser.add_mutually_exclusive_group(required=True)
      outputs_group.add_argument(
          "--outputs",
          type=str,
          help="json serialized dict of output artifacts.",
      )
      outputs_group.add_argument(
          "--outputs-base64",
          type=str,
          help="base64 encoded json serialized dict of output artifacts.",
      )
  
      execution_group = parser.add_mutually_exclusive_group(
          required=True
      )
      execution_group.add_argument(
          "--exec-properties",
          type=str,
          help="json serialized dict of (non artifact) execution properties.",
      )
      execution_group.add_argument(
          "--exec-properties-base64",
          type=str,
          help="base64 encoded dict of (non artifact) execution properties.",
      )
  
      parser.add_argument(
          "--write-outputs-stdout",
          dest="write_outputs_stdout",
          action="store_true",
          help="Write outputs to last line of stdout, which will "
          "be pushed to xcom in Airflow. Please ignore by other users or "
          "orchestrators.",
      )
  
      return parser.parse_known_args(argv)
  
file_path: tfx/tfx/scripts/run_executor.py
imports: import argparse
  import base64
  import json
  from typing import List, Tuple
  import absl
  from absl import app
  from absl.flags import argparse_flags
  from tfx.dsl.components.base import base_beam_executor
  from tfx.dsl.components.base import base_executor
  from tfx.types import artifact_utils
  from tfx.utils import import_utils
label_desc: Use image node_id 2 for calling a global function with example usage: parse_flags(argv) and returns: parser