code: def get_instances(self):
          # type: () -> List[Tuple[str, str, int]]
          
          with self.__instances_lock:
              return sorted(
                  (name, stored_instance.factory_name, stored_instance.state)
                  for name, stored_instance in self.__instances.items()
              )
docs: Retrieves the list of the currently registered component instances
  
          :return: A list of (name, factory name, state) tuples.