def GuessValueType(self, value):
    """Get the type of value."""
    if value in ["None", "none", None]:
      return None

    if value in ["True", "true", "yes"]:
      return True

    if value in ["False", "false", "no"]:
      return False

    try:
      return int(value)
    except (TypeError, ValueError):
      try:
        return float(value)
      except (TypeError, ValueError):
        try:
          return value.decode("utf8")
        except UnicodeDecodeError:
          return value
dataset/ETHPy150Open google/grr/grr/gui/plugins/semantic.py/KeyValueFormRenderer.GuessValueType/original