code: def cast_object(self, interface_object, interface_class):
          
          name = interface_class.__name__
          i = self.manager.queryInterface(interface_object._i, name)
          return interface_class(interface=i)
docs: Cast the obj to the interface class
  
          :rtype: interface_class(interface_object)