def _is_close(d1, d2, atolerance=0, rtolerance=0):
    """Determines whether two adjacency matrices are within
    a provided tolerance.
    
    Parameters
    ----------
    d1 : dict
        Adjacency dictionary
    
    d2 : dict
        Adjacency dictionary
    
    atolerance : float
        Some scalar tolerance value to determine closeness
    
    rtolerance : float
        A scalar tolerance value that will be some proportion
        of ``d2``'s value
    
    Returns
    -------
    closeness : bool
        If all of the nodes within ``d1`` and ``d2`` are within
        a predefined tolerance, they are considered "close" and
        this method will return True. Otherwise, this method will
        return False.
    
    """
    # Pre-condition: d1 and d2 have the same keys at each level if they
    # are dictionaries.
    if not isinstance(d1, dict) and not isinstance(d2, dict):
        return abs(d1 - d2) <= atolerance + rtolerance * abs(d2)
    return all(all(_is_close(d1[u][v], d2[u][v]) for v in d1[u]) for u in d1)