def METHOD_NAME(
        sinks: Dict[str, MetadataSink],
        metadata: List[Dict],
):
    """Attaches metadata inplace to a collection of sinks. Metadata can be 
    provided at the cell and sweep levels.
    Parameters
    ----------
    sinks : Configured sinks for outputs. Will be modified by metadata 
        attachment
    metadata : Each is a dictionary with the following fields
    Raises
    ------
    ValueError : If a piece of metadata is argued to 
        an incompatible sink.
    """
    for metadatum in metadata:
        for sink_name in metadatum["sinks"]:
            sinks[sink_name].register(
                metadatum["name"],
                metadatum["value"],
                metadatum.get("sweep_number", None)
            )