A wrapper for `os.environ.get` that works the same way in both Pythons.

  Args:
    variable: A name of the variable to get the value of.
    default: A default value to return in case no value for the given variable
      is set.

  Returns:
    An environment value of the given variable.

def Environ(variable, default):
  """A wrapper for `os.environ.get` that works the same way in both Pythons.

  Args:
    variable: A name of the variable to get the value of.
    default: A default value to return in case no value for the given variable
      is set.

  Returns:
    An environment value of the given variable.
  """
  precondition.AssertType(variable, Text)

  value = os.environ.get(variable, default)
  if value is None:
    return default
  if PY2:
    # TODO(hanuszczak): https://github.com/google/pytype/issues/127
    value = value.decode("utf-8")  # pytype: disable=attribute-error
  return value