code: def export_metadata(self, fields=None, forms=None, format='json',
              df_kwargs=None):
          
          ret_format = format
          if format == 'df':
              from pandas import read_csv
              ret_format = 'csv'
          pl = self.__basepl('metadata', format=ret_format)
          to_add = [fields, forms]
          str_add = ['fields', 'forms']
          for key, data in zip(str_add, to_add):
              if data:
                  pl[key] = ','.join(data)
          response, _ = self._call_api(pl, 'metadata')
          if format in ('json', 'csv', 'xml'):
              return response
          elif format == 'df':
              if not df_kwargs:
                  df_kwargs = {'index_col': 'field_name'}
              return read_csv(StringIO(response), **df_kwargs)
docs: Export the project's metadata
  
          Parameters
          ----------
          fields : list
              Limit exported metadata to these fields
          forms : list
              Limit exported metadata to these forms
          format : (``'json'``), ``'csv'``, ``'xml'``, ``'df'``
              Return the metadata in native objects, csv or xml.
              ``'df'`` will return a ``pandas.DataFrame``.
          df_kwargs : dict
              Passed to ``pandas.read_csv`` to control construction of
              returned DataFrame.
              by default ``{'index_col': 'field_name'}``
  
          Returns
          -------
          metadata : list, str, ``pandas.DataFrame``
              metadata sttructure for the project.