def METHOD_NAME(segment="train"):
    assert segment in ["train", "valid", "test"]
    url = "https://data.dgl.ai/dataset/sudoku-hard.zip"
    zip_fname = "/tmp/sudoku-hard.zip"
    dest_dir = "/tmp/sudoku-hard/"
    if not os.path.exists(dest_dir):
        print("Downloading data...")
        urllib.request.urlretrieve(url, zip_fname)
        with zipfile.ZipFile(zip_fname) as f:
            f.extractall("/tmp/")
    def read_csv(fname):
        print("Reading %s..." % fname)
        with open(dest_dir + fname) as f:
            reader = csv.reader(f, delimiter=",")
            return [(q, a) for q, a in reader]
    data = read_csv(segment + ".csv")
    def encode(samples):
        def parse(x):
            return list(map(int, list(x)))
        encoded = [(parse(q), parse(a)) for q, a in samples]
        return encoded
    data = encode(data)
    print(f"Number of puzzles in {segment} set : {len(data)}")
    return data