code: def parse_args():
      """Parses commandline arguments.
  
      Returns:
        A tuple (parsed, unparsed) of the parsed object and a group of unparsed
          arguments that did not match the parser.
      """
      parser = argparse.ArgumentParser()
      parser.register("type", "bool", lambda v: v.lower() == "true")
      parser.add_argument(
          "--max_steps",
          type=int,
          default=10,
          help="Number of steps to run trainer.",
      )
      parser.add_argument(
          "--train_batch_size",
          type=int,
          default=100,
          help="Batch size used during training.",
      )
      parser.add_argument(
          "--learning_rate",
          type=float,
          default=0.025,
          help="Initial learning rate.",
      )
      parser.add_argument(
          "--data_dir",
          type=str,
          default="/tmp/mnist_data",
          help="Directory for storing data",
      )
      parser.add_argument(
          "--ui_type",
          type=str,
          default="readline",
          help="Command-line user interface type (only readline is supported)",
      )
      parser.add_argument(
          "--fake_data",
          type="bool",
          nargs="?",
          const=True,
          default=False,
          help="Use fake MNIST data for unit testing",
      )
      parser.add_argument(
          "--debug",
          type="bool",
          nargs="?",
          const=True,
          default=False,
          help="Use debugger to track down bad values during training. "
          "Mutually exclusive with the --tensorboard_debug_address flag.",
      )
      parser.add_argument(
          "--tensorboard_debug_address",
          type=str,
          default=None,
          help="Connect to the TensorBoard Debugger Plugin backend specified by "
          "the gRPC address (e.g., localhost:1234). Mutually exclusive with the "
          "--debug flag.",
      )
      parser.add_argument(
          "--use_random_config_path",
          type="bool",
          nargs="?",
          const=True,
          default=False,
          help="""If set, set config file path to a random file in the temporary
        directory.""",
      )
      return parser.parse_known_args()
  
imports: import argparse
  import sys
  import tempfile
  import tensorflow
  from tensorflow.python import debug
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser