def _get_bool(self, variable, default=False):
    value = self._environ.get(variable)
    if value is not None:
      if value.lower() in ('0', 'false'):
        return False
      elif value.lower() in ('1', 'true'):
        return True
      else:
        die('Invalid value for %s, must be 0/1/false/true, got %r' % (variable, value))
    else:
      return self._defaulted(default)
dataset/ETHPy150Open pantsbuild/pex/pex/variables.py/Variables._get_bool/original