def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def _roots(kindpats):
    """Returns root directories to match recursively from the given patterns."""
    roots, dirs = _patternrootsanddirs(kindpats)
    return roots