def METHOD_NAME(
    cls,
    num_rows: int = 10,
    train: bool = True,
    filename: str = "criteo",
) -> Generator[str, None, None]:
    with tempfile.TemporaryDirectory() as tmpdir:
        path = os.path.join(tmpdir, filename)
        with open(path, "w") as f:
            rows = []
            for _ in range(num_rows):
                row = []
                if train:
                    row.append(str(random.randint(*cls.LABEL_VAL_RANGE)))
                row += [
                    *(
                        str(random.randint(*cls.INT_VAL_RANGE))
                        for _ in range(cls.INT_FEATURE_COUNT)
                    ),
                    *(
                        (
                            "%x"
                            % abs(hash(str(random.randint(*cls.CAT_VAL_RANGE))))
                        ).zfill(8)[:8]
                        for _ in range(cls.CAT_FEATURE_COUNT)
                    ),
                ]
                rows.append(row)
            cf = csv.writer(f, delimiter="\t")
            cf.writerows(rows)
        yield path