code: def register(cls, interface_type, resource_class):
          
          def _internal(python_class):
              if (interface_type, resource_class) in cls._session_classes:
                  logger.warning('%s is already registered in the ResourceManager. '
                                 'Overwriting with %s' % ((interface_type, resource_class), python_class))
  
              python_class.session_type = (interface_type, resource_class)
              cls._session_classes[(interface_type, resource_class)] = python_class
              return python_class
          return _internal
docs: Register a session class for a given interface type and resource class.
  
          :type interface_type: constants.InterfaceType
          :type resource_class: str