(self, *tags)
return wrap
Decorator that adds a factory function to the container with tags.

    Args:
      *tags: Strings specifying the tags for this function.

    Returns:
      The same function.

    Raises:
      ValueError: if a function with the same name already exists within the
        container and `allow_overriding_keys` is False.
Decorator that adds a factory function to the container with tags.
Decorator that adds a factory function to the container with tags .
def add(self, *tags):
    """Decorator that adds a factory function to the container with tags.

    Args:
      *tags: Strings specifying the tags for this function.

    Returns:
      The same function.

    Raises:
      ValueError: if a function with the same name already exists within the
        container and `allow_overriding_keys` is False.
    """
    def wrap(factory_func):
      name = factory_func.__name__
      if name in self and not self.allow_overriding_keys:
        raise ValueError(_NAME_ALREADY_EXISTS.format(name=name))
      self._tasks[name] = factory_func
      for tag in tags:
        self._tags[tag][name] = factory_func
      return factory_func
    return wrap
def add ( self , * tags ) : def wrap ( factory_func ) : name = factory_func . __name__ if name in self and not self . allow_overriding_keys : raise ValueError ( _NAME_ALREADY_EXISTS . format ( name = name ) ) self . _tasks [ name ] = factory_func for tag in tags : self . _tags [ tag ] [ name ] = factory_func return factory_func return wrap