resolve_keyed_source
resolve_keyed_source(
sources: collections.abc.Mapping[collections.abc.Mapping[str, Any], collections.abc.Iterable[tuple[str, Any]]] ,
key ,
where: str = the resource,
)
Return the one source a source_patch_key names.
Resolves a native key as the default FiberIO.read_array does: an empty resource is missing data, and an unknown key, an ambiguous keyless one, or a key naming more than one source cannot be resolved. Unlike the default it takes no positional key, since a format which states its own keys never synthesizes one.
sources maps each native key to whatever the caller needs back, and is read lazily, so an h5py group can be passed as it is. Pass (key, value) pairs instead where a resource can state one key twice, so the ambiguity is seen rather than silently resolved.