def filter_notebooks(all_notebooks: set[str], skip_list: list[str]):
    """Returns the absolute path for notebooks except those that are skipped.

    Args:
        all_notebooks: set of interesting relative notebook paths.
        skip_list: list of glob patterns. Notebooks matching any of these glob
            in `all_notebooks` will not be returned.

    Returns:
        a sorted list of absolute paths to the notebooks that don't match any of
        the `skip_list` glob patterns.
    """

    skipped_notebooks = functools.reduce(
        lambda a, b: a.union(b), list(set(glob.glob(g, recursive=True)) for g in skip_list)
    )

    # sorted is important otherwise pytest-xdist will complain that
    # the workers have different parametrization:
    # https://github.com/pytest-dev/pytest-xdist/issues/432
    return sorted(os.path.abspath(n) for n in all_notebooks.difference(skipped_notebooks))
Returns the absolute path for notebooks except those that are skipped.

    Args:
        all_notebooks: set of interesting relative notebook paths.
        skip_list: list of glob patterns. Notebooks matching any of these glob
            in `all_notebooks` will not be returned.

    Returns:
        a sorted list of absolute paths to the notebooks that don't match any of
        the `skip_list` glob patterns.
    
dev_tools/notebooks/utils.py