code: def getmodeldefinition(self, storageobject, required=False):
  
          
          if isinstance(storageobject, StorageTableModel):
              definitionlist = [definition for definition in self._modeldefinitions if definition['modelname'] == storageobject.__class__.__name__]
       
          elif isinstance(storageobject, StorageTableQuery):
              """ StorageTableQuery """
              storagemodel = storageobject._storagemodel
              definitionlist = [definition for definition in self._modeldefinitions if definition['modelname'] == storagemodel.__class__.__name__]
          else:
              raise Exception("Argument is not an StorageTableModel nor an StorageTableQuery")
                                                                              
          # is there only one modeldefinition ?
          # hopefully!
          modeldefinition = None
  
          if len(definitionlist) == 1:
              modeldefinition = definitionlist[0]
  
          elif len(definitionlist) > 1:
              raise ModelRegisteredMoreThanOnceError(storageobject)
  
          # is there a modeldefinition if required ?
          if required and modeldefinition is None:
              raise ModelNotRegisteredError(storageobject)
  
          return modeldefinition
docs: find modeldefinition for StorageTableModel or StorageTableQuery