def bonferroni_correction(scaffoldgraph, crit):
    """Returns bonferroni corrected significance level for each hierarchy.

    Parameters
    ----------
    scaffoldgraph : ScaffoldGraph
        A ScaffoldGraph object to query.
    crit : float
        The critical significance value to apply bonferroni correction at
        each scaffold hierarchy.

    Returns
    -------
    dict
        A dictionary containing the corrected critical significance value
        at each scaffold hierarchy {hierarchy: crit}.

    """
    hier = scaffoldgraph.get_hierarchy_sizes()
    return {k: crit / v for k, v in hier.items()}