(kind, name)
| 20 | |
| 21 | |
| 22 | def lookup(kind, name): |
| 23 | if isinstance(name, collections.abc.Mapping): |
| 24 | name = name['name'] |
| 25 | |
| 26 | if kind not in _REGISTRY: |
| 27 | raise KeyError('Nothing registered under "{}"'.format(kind)) |
| 28 | return _REGISTRY[kind][name] |
| 29 | |
| 30 | |
| 31 | def construct(kind, config, unused_keys=(), **kwargs): |