def assure_entity(fnc):
 @wraps(fnc)
 def _wrapped(self, entity, *args, **kwargs):
  if (not isinstance(entity, CloudMonitorEntity)):
   entity = self._entity_manager.get(entity)
  return fnc(self, entity, *args, **kwargs)
 return _wrapped

def assure_entity ( fnc ) : @ wraps ( fnc ) def _wrapped ( self , entity , * args , ** kwargs ) : if ( not isinstance ( entity , CloudMonitorEntity ) ) : 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 .