code: def is_presence_handler(type_, from_, cb):
      
  
      try:
          handlers = aioxmpp.service.get_magic_attr(cb)
      except AttributeError:
          return False
  
      return aioxmpp.service.HandlerSpec(
          (_apply_presence_handler, (type_, from_)),
          require_deps=(
              SimplePresenceDispatcher,
          )
      ) in handlers
docs: Return true if `cb` has been decorated with :func:`presence_handler` for
      the given `type_` and `from_`.