Configure haps manually, an alternative
        to :func:`~haps.Container.autodiscover`

        :param config: List of configured Eggs
        :param subclass: Optional Container subclass that should be used

def configure(config: List[Egg], subclass: 'Container' = None) -> None:
        """
        Configure haps manually, an alternative
        to :func:`~haps.Container.autodiscover`

        :param config: List of configured Eggs
        :param subclass: Optional Container subclass that should be used
        """

        profiles = Configuration().get_var(PROFILES, tuple)
        assert isinstance(profiles, (list, tuple))
        profiles = tuple(profiles) + (None,)

        seen = set()
        registered = set()

        filtered_config: List[Egg] = []

        for profile in profiles:
            for egg_ in (e for e in config if e.profile == profile):
                ident = (egg_.base_, egg_.qualifier, egg_.profile)
                if ident in seen:
                    raise ConfigurationError(
                        "Ambiguous implementation %s" % repr(egg_.base_))
                dep_ident = (egg_.base_, egg_.qualifier)
                if dep_ident in registered:
                    continue

                filtered_config.append(egg_)

                registered.add(dep_ident)
                seen.add(ident)
        config = filtered_config

        with Container._lock:
            if Container.__configured:
                raise AlreadyConfigured
            if subclass is None:
                subclass = Container

            Container.__subclass = subclass
            Container.__configured = True

            container = Container()
            if not all(isinstance(o, Egg) for o in config):
                raise ConfigurationError('All config items should be the eggs')
            container.config = config

            container.register_scope(INSTANCE_SCOPE, InstanceScope)
            container.register_scope(SINGLETON_SCOPE, SingletonScope)