def METHOD_NAME(argv):
  """Parses execution arguments and replaces default values.
  Args:
    argv: Input arguments from sys.
  Returns:
    Parsed arguments.
  """
  parser = argparse.ArgumentParser()
  parser.add_argument(
      '--batch_size',
      type=int,
      default=128,
      help='Batch size to use during training.')
  parser.add_argument(
      '--dropout',
      type=float,
      default=None,
      help='Percent of nodes to dropout in dropout layer.')
  parser.add_argument(
      '--first_layer_size',
      type=int,
      default=15,
      help='Size of first hidden layer of network.')
  parser.add_argument(
      '--input_dir',
      required=True,
      help='GCS or local directory containing outputs from preprocessing.')
  parser.add_argument(
      '--learning_rate',
      type=float,
      default=0.001,
      help='Learning rate to use during training.')
  parser.add_argument(
      '--max_steps',
      type=int,
      default=10000,
      help='Maxium number of steps to train model.')
  parser.add_argument(
      '--num_layers',
      type=int,
      default=1,
      help='Number of hidden layers of network.')
  parser.add_argument(
      '--output_dir',
      required=True,
      help='Directory where model outputs will be written.')
  parser.add_argument(
      '--save_checkpoints_steps',
      type=int,
      default=500,
      help='Number of steps between checkpoint saves.')
  args, _ = parser.parse_known_args(args=argv[1:])
  # Adds the trial number from environment variables to avoid clobber output
  # during hyper-parameters tuning.
  trial_id = json.loads(os.environ.get('TF_CONFIG', '{}')).get('task', {}).get(
      'trial', '')
  if not trial_id:
    trial_id = '1'
  args.output_dir = posixpath.join(args.output_dir, 'trials', trial_id)
  return args