def METHOD_NAME(v):
  """For internal use only; no backwards-compatibility guarantees.
  Converts ``extra_types.JsonValue`` objects into Python objects.
  Args:
    v: ``JsonValue`` object to be converted.
  Returns:
    A Python object structured as values, lists, and dictionaries corresponding
    to ``JsonValue``, ``JsonArray`` and ``JsonObject`` types.
  Raises:
    TypeError: if the ``JsonValue`` object contains a type that is
      not supported.
  The types supported are ``str``, ``bool``, ``list``, ``dict``, and ``None``.
  The Dataflow API returns JsonValue(s) in many places and it is quite
  convenient to be able to convert these hierarchical objects to much simpler
  Python objects.
  """
  if isinstance(v, extra_types.JsonValue):
    if v.string_value is not None:
      return v.string_value
    elif v.boolean_value is not None:
      return v.boolean_value
    elif v.integer_value is not None:
      return v.integer_value
    elif v.double_value is not None:
      return v.double_value
    elif v.array_value is not None:
      return METHOD_NAME(v.array_value)
    elif v.object_value is not None:
      return METHOD_NAME(v.object_value)
    elif v.is_null:
      return None
  elif isinstance(v, extra_types.JsonArray):
    return [METHOD_NAME(e) for e in v.entries]
  elif isinstance(v, extra_types.JsonObject):
    return {p.key: METHOD_NAME(p.value) for p in v.properties}
  raise TypeError('Cannot convert %s from a JSON value.' % repr(v))