docs: def getEntity(self, name):
          """
          Get entity corresponding to the specified name (looks for it in all
          types of entities).
  
          Args:
              name: Name of the entity.
  
          Raises:
              TypeError: if the specified entity does not exist.
  
          Returns:
              The AMPL entity with the specified name.
          """
          return lock_and_call(
              lambda: Entity(self._impl.getEntity(name)),
              self._lock
          )