def configure_custom(self, config):
c = config.pop('<STR_LIT>')<EOL>if not hasattr(c, '<STR_LIT>') andhasattr(types, '<STR_LIT>') and isinstance(c, types.ClassType):<EOL><INDENT>c = self.resolve(c)<EOL><DEDENT>props = config.pop('<STR_LIT:.>', None)<EOL>kwargs = dict((k, config[k]) for k in config if valid_ident(k))<EOL>result = c(**kwargs)<EOL>if props:<EOL><INDENT>for name, value in props.items():<EOL><INDENT>setattr(result, name, value)<EOL><DEDENT><DEDENT>return result<EOL>
Configure an object with a user-supplied factory.