def METHOD_NAME(value):
  """Encodes value as a GN literal."""
  if isinstance(value, str):
    return '"' + value + '"'
  elif isinstance(value, bool):
    return repr(value).lower()
  else:
    return repr(value)