def _maybe_convert_to_int(value):
  """Returns the int representation contained by string |value| if it contains
  one. Otherwise returns |value|."""
  try:
    return int(value)
  except ValueError:
    return value