<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_contacts(self):
 """ Returns list of contacts Returns: dict: the roster of contacts """

        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