def _locate_images(self):
        extensions = '|'.join(self.valid_extensions)
        extension_re = re.compile('.+\.(%s)$' % extensions, re.IGNORECASE)
        files = sorted(os.listdir(self.path))

        images = []
        for root, dirs, files in os.walk(self.path, followlinks=self.config['follow_links']):
            for filename in sorted(files):
                if not filename.startswith('.') and extension_re.match(filename):
                    images.append(Image(path=os.path.join(root, filename), config=self.config))
            if not self.config['recursive']:
                break

        if not images:
            raise SourceImagesNotFoundError(self.path)

        images = sorted(images, reverse=self.config['algorithm_ordering'][0] != '-')

        return images
construct a Transient2d instance from a
dataset/ETHPy150Open jorgebastida/glue/glue/core.py/Sprite._locate_images--crossover with--dataset/ETHPy150Open modflowpy/flopy/flopy/utils/util_array.py/Transient2d.from_4d