import glob


def generate_files(original_pattern: str, mask_pattern: str):
    """generator for original and mask img path

    Args:
        original_pattern (str): original path pattern
        mask_pattern (str): mask path pattern
    """

    def real_generator():
        original_img_paths = sorted(glob.glob(original_pattern))
        mask_img_paths = sorted(glob.glob(mask_pattern))
        for o, m in zip(original_img_paths, mask_img_paths):
            yield o, m

    return real_generator