code: def _main():
      
      if argv[1:]:
          stdout.write(_CLI_HELP)
          raise SystemExit()
      for line in stdin:
          try:
              message = loads(line)
          except ValueError:
              stdout.write("Not JSON: {}\n\n".format(line.rstrip(b"\n")))
              continue
          if REQUIRED_FIELDS - set(message.keys()):
              stdout.write(
                  "Not an Eliot message: {}\n\n".format(line.rstrip(b"\n")))
              continue
          result = pretty_format(message) + "\n"
          if PY2:
              result = result.encode("utf-8")
          stdout.write(result)
docs: Command-line program that reads in JSON from stdin and writes out
      pretty-printed messages to stdout.