code: def get_contacts(self):
          
          for jid, item in self.roster.items.items():
              try:
                  self._contacts[jid.bare()].update(item.export_as_json())
              except KeyError:
                  self._contacts[jid.bare()] = item.export_as_json()
  
          return self._contacts
docs: Returns list of contacts
  
          Returns:
            dict: the roster of contacts