def create(self, configurable, config=None, **kwargs):
<EOL>if isinstance(configurable, string_types):<EOL><INDENT>candidates = [ac for ac in self.sub_modules<EOL>if ac.config_name == configurable]<EOL>if len(candidates) == <NUM_LIT:0>:<EOL><INDENT>raise KeyError(configurable)<EOL><DEDENT>configurable = candidates[<NUM_LIT:0>]<EOL><DEDENT>if not isinstance(configurable, AutoConfigured):<EOL><INDENT>configurable = AutoConfigured.from_obj(configurable)<EOL><DEDENT>if config is None:<EOL><INDENT>config = self.config.get(configurable.config_name, {})<EOL><DEDENT>params = {}<EOL>for other, default in iteritems(configurable.default_config):<EOL><INDENT>params[other] = kwargs.get(other, config.get(other, default))<EOL><DEDENT>for other in getattr(configurable, '<STR_LIT>', []):<EOL><INDENT>if other == '<STR_LIT>':<EOL><INDENT>params[other] = dict(config, **kwargs)<EOL><DEDENT>elif other in kwargs:<EOL><INDENT>params[other] = kwargs[other]<EOL><DEDENT>elif other in config:<EOL><INDENT>params[other] = config[other]<EOL><DEDENT>else:<EOL><INDENT>params[other] = getattr(self, other)<EOL><DEDENT><DEDENT>return configurable(**params)<EOL>
Create a sub-object of this factory.

        Instantiates the `configurable` object with the current saved
        :attr:`config`.  This essentially translates to
        ``configurable(**config)``, except services defined in the
        parent and requested by `configurable` (by setting the
        ``services`` attribute) are injected. If a service is not
        defined on this factory object, then a
        :exc:`yakonfig.ProgrammerError` is raised.

        If `config` is provided, it is a local configuration for
        `configurable`, and it overrides the saved local configuration
        (if any).  If not provided, then :attr:`config` must already be
        set, possibly by passing this object into the :mod:`yakonfig`
        top-level setup sequence.

        :param callable configurable: object to create
        :param dict config: local configuration for `configurable`
        :param kwargs: additional keyword parameters
        :return: ``configurable(**config)``