code: def debug_form_contents(form: cgi.FieldStorage,
                          to_stderr: bool = True,
                          to_logger: bool = False) -> None:
      
      for k in form.keys():
          text = "{0} = {1}".format(k, form.getvalue(k))
          if to_stderr:
              sys.stderr.write(text)
          if to_logger:
              log.info(text)
docs: Writes the keys and values of a CGI form to ``stderr``.