@classmethod
def get_event(cls, session):
    """
        Gets the event that is pending for this class.  Events are
        returned in the form of objects.  Objects that have been deleted
        are marked as such.

        :param session:  the instance of Session used for APIC communication
        """
    urls = cls._get_subscription_urls()
    for url in urls:
        if not session.has_events(url):
            continue
        event = session.get_event(url)
        for class_name in cls._get_apic_classes():
            if class_name in event['imdata'][0]:
                break
        attributes = event['imdata'][0][class_name]['attributes']
        status = str(attributes['status'])
        dn = str(attributes['dn'])
        parent = cls._get_parent_from_dn(cls._get_parent_dn(dn))
        if status == 'created':
            name = str(attributes['name'])
        else:
            name = cls._get_name_from_dn(dn)
        obj = cls(name, parent=parent)
        obj._populate_from_attributes(attributes)
        if status == 'deleted':
            obj.mark_as_deleted()
        return obj
