def check_all_attrs_present(attr_mapping, attrs=('name', 'length', 'cov',
    'seq')):
    """Given a dict of attributes, ensures that all attrs are keys in the dict.

        This is used to make sure all nodes in the graph have the information
        we expect nodes to have.

        Parameters
        ----------

        attr_mapping: dict
            A dictionary describing the attributes of a node.

        attrs: collection
            All of the required attributes that we expect to be present as keys
            in attr_mapping. The defaults for this are pretty reasonable.

        Returns
        -------

        None

        Raises
        ------

        If any of the entries in "attrs" are not present in attr_mapping, this
        will raise a ValueError.
    """
    for required_attr in attrs:
        if required_attr not in attr_mapping:
            raise ValueError('{} not present for all nodes'.format(
                required_attr))
