code: def get_stanza(self, peer_jid):
          
          try:
              return self._presences[peer_jid.bare()][peer_jid.resource]
          except KeyError:
              pass
          try:
              return self._presences[peer_jid.bare()][None]
          except KeyError:
              pass
docs: Return the last presence recieved for the given bare or full
          `peer_jid`. If the last presence was unavailable, the return value is
          :data:`None`, as if no presence was ever received.
  
          If no presence was ever received for the given bare JID, :data:`None`
          is returned.