def assure_entity(fnc):
    """
    Converts an entityID passed as the entity to a CloudMonitorEntity object.
    """
    @wraps(fnc)
    def _wrapped(self, entity, *args, **kwargs):
        if not isinstance(entity, CloudMonitorEntity):
            # Must be the ID
            entity = self._entity_manager.get(entity)
        return fnc(self, entity, *args, **kwargs)
    return _wrapped
Converts an entityID passed as the entity to a CloudMonitorEntity object.