def verify_embedding(emb, source, target, ignore_errors=()):
    """A simple (exception-raising) diagnostic for minor embeddings.

    See :func:`diagnose_embedding` for a more detailed diagnostic / more information.

    Args:
        emb (dict): a dictionary mapping source nodes to arrays of target nodes
        source (graph or edgelist): the graph to be embedded
        target (graph or edgelist): the graph being embedded into

    Raises:
        EmbeddingError: a catch-all class for the below

        MissingChainError: in case a key is missing from `emb`, or the associated chain is empty
        ChainOverlapError: in case two chains contain the same target node
        DisconnectedChainError: in case a chain is disconnected
        InvalidNodeError: in case a chain contains a node label not found in `target`
        MissingEdgeError: in case a source edge is not represented by any target edges

    Returns:
        bool: True (if no exception is raised)
    """

    for error in diagnose_embedding(emb, source, target):
        eclass = error[0]
        if eclass not in ignore_errors:
            raise eclass(*error[1:])
    return True
A simple (exception-raising) diagnostic for minor embeddings.

    See :func:`diagnose_embedding` for a more detailed diagnostic / more information.

    Args:
        emb (dict): a dictionary mapping source nodes to arrays of target nodes
        source (graph or edgelist): the graph to be embedded
        target (graph or edgelist): the graph being embedded into

    Raises:
        EmbeddingError: a catch-all class for the below

        MissingChainError: in case a key is missing from `emb`, or the associated chain is empty
        ChainOverlapError: in case two chains contain the same target node
        DisconnectedChainError: in case a chain is disconnected
        InvalidNodeError: in case a chain contains a node label not found in `target`
        MissingEdgeError: in case a source edge is not represented by any target edges

    Returns:
        bool: True (if no exception is raised)