code: def as_fixture(self, name=None):
          
          if name is None:
              name = self.name
  
          def deco(f):
              @functools.wraps(f)
              def wrapper(*args, **kw):
                  with self:
                      kw[name] = self
                      return f(*args, **kw)
              return wrapper
          return deco
docs: A decorator to inject this container into a function as a test fixture.