def _is_beneath(a, b):
    """Is 'a' beneath 'b'?

    Args:
        a : string (path)
        b : string (path)

    Returns:
        bool: True if a is beneath (or equal to) b
    """

    # Everything is beneath the top ("")
    if (b==""):
        return True

    # If paths are both blank, they are equal
    if (b=="" and a==""):
        return True

    A = a.split(".")
    B = b.split(".")

    # A is not beneath B if any part is not the same
    while (len(A) > 0 and len(B) > 0):
        if (A.pop(0) != B.pop(0)):
            return False

    # A is not beneath B if B is longer
    if (len(B) > 0):
        return False

    return True