code: def get_peer_resources(self, peer_jid):
          
          try:
              d = dict(self._presences[peer_jid])
              d.pop(None, None)
              return d
          except KeyError:
              return {}
docs: Return a dict mapping resources of the given bare `peer_jid` to the
          presence state last received for that resource.
  
          Unavailable presence states are not included. If the bare JID is in a
          error state (i.e. an error presence stanza has been received), the
          returned mapping is empty.