def in_resource(cls, session_type):
        """Returns True if the attribute is part of a given session type.

        The session_type is a tuple with the interface type and resource_class

        :type session_type: (constants.InterfaceType, str)
        :rtype: bool
        """
        if cls.resources is AllSessionTypes:
            return True
        return session_type in cls.resources
def in_resource ( cls , session_type ) : if cls . resources is AllSessionTypes : return True return session_type in cls . resources
Returns True if the attribute is part of a given session type.

        The session_type is a tuple with the interface type and resource_class

        :type session_type: (constants.InterfaceType, str)
        :rtype: bool