code: def _get_from_factory(self, factory, svc_registration):
          # type: (Any, ServiceRegistration) -> Any
          
          svc_ref = svc_registration.get_reference()
          try:
              # Use the existing service
              service, counter = self.__factored[svc_ref]
              counter.inc()
          except KeyError:
              # Create the service
              service = factory.get_service(self.__bundle, svc_registration)
              counter = _UsageCounter()
              counter.inc()
  
              # Store the counter
              self.__factored[svc_ref] = (service, counter)
  
          return service
docs: Returns a service instance from a Prototype Service Factory
  
          :param factory: The prototype service factory
          :param svc_registration: The ServiceRegistration object
          :return: The requested service instance returned by the factory