import pathlib
import builtins
import typing


def glob_imgs(
    path: pathlib.Path, ext: builtins.str = "*.nii*"
) -> typing.List[pathlib.Path]:
    """grab all `ext` files in a directory and sort them for consistency"""
    return sorted(path.glob(ext))