docs: def metadata(self,
                   exportFormat="default",
                   output=None,
                   saveFolder=None,
                   fileName=None):
          """
          exports metadata to the various supported formats
          Inputs:
            exportFormats - export metadata to the following formats: fgdc,
             inspire, iso19139, iso19139-3.2, iso19115, arcgis, and default.
             default means the value will be ISO 19139 Metadata
             Implementation Specification GML3.2 or the default format set
             for your ArcGIS online organizational account.
            output - html or none.  Html returns values as html text.
            saveFolder - Default is None. If provided the metadata file will
             be saved to that location.
            fileName - Default is None. If provided, this will be the name of
             the file on your local drive.
          Output:
           path to file or string
          """
          url = "%s/info/metadata/metadata.xml" % self.root
          allowedFormats = ["fgdc", "inspire", "iso19139",
                            "iso19139-3.2", "iso19115", "arcgis", "default"]
          if not exportFormat.lower() in allowedFormats:
              raise Exception("Invalid exportFormat")
          if exportFormat.lower() == "arcgis":
              params = {}
          else:
              params = {
                  "format" : exportFormat
              }
          if exportFormat.lower() == "default":
              exportFormat = ""
          params = {
              "format" : exportFormat
          }
          if output is not None:
              params['output'] = output
          if saveFolder is None:
              saveFolder = tempfile.gettempdir()
          if fileName is None:
              fileName = "metadata.xml"
          if output is None:
              result = self._get(url=url,
                                 param_dict=params,
                                 securityHandler=self._securityHandler,
                                 proxy_url=self._proxy_url,
                                 proxy_port=self._proxy_port,
                                 out_folder=saveFolder,
                                 file_name=fileName)
              if os.path.isfile(result) == False:
                  with open(os.path.join(saveFolder, fileName), 'wb') as writer:
                      writer.write(result)
                      writer.flush()
                      writer.close()
                  return os.path.join(saveFolder, fileName)
  
              return result
          else:
              return self._post(url=url,
                                  param_dict=params,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port)