code: def is_locked(self):
          
          if not self.__locked__:
              return False
          elif self.get_parent():
              return self.get_parent().is_locked()
  
          return True
docs: Returns whether model is locked