code: def __get_factory_with_context(self, factory_name):
          # type: (str) -> Tuple[type, FactoryContext]
          
          factory = self.__factories.get(factory_name)
          if factory is None:
              raise TypeError("Unknown factory '{0}'".format(factory_name))
  
          # Get the factory context
          factory_context = getattr(
              factory, constants.IPOPO_FACTORY_CONTEXT, None
          )
          if factory_context is None:
              raise TypeError(
                  "Factory context missing in '{0}'".format(factory_name)
              )
  
          return factory, factory_context
docs: Retrieves the factory registered with the given and its factory context
  
          :param factory_name: The name of the factory
          :return: A (factory, context) tuple
          :raise TypeError: Unknown factory, or factory not manipulated