code: def extract(environ, empty=False, err=False):
      
      formdata = cgi.parse(environ['wsgi.input'], environ, empty, err)
      # Remove single entries from lists
      for key, value in iter(formdata.items()):
          if len(value) == 1:
              formdata[key] = value[0]
      return formdata
docs: Extracts strings in form data and returns a dict.
  
      :param environ: WSGI environ
      :param empty: Stops on empty fields (default: Fault)
      :param err: Stops on errors in fields (default: Fault)