def METHOD_NAME(dataset, data_dir, train_bs, test_bs, client_idx=None):
    train_h5 = h5py.File(os.path.join(data_dir, DEFAULT_TRAIN_FILE), "r")
    test_h5 = h5py.File(os.path.join(data_dir, DEFAULT_TEST_FILE), "r")
    train_x = []
    test_x = []
    train_y = []
    test_y = []
    # load data
    if client_idx is None:
        # get ids of all clients
        train_ids = client_ids_train
        test_ids = client_ids_test
    else:
        # get ids of single client
        train_ids = [client_ids_train[client_idx]]
        test_ids = [client_ids_test[client_idx]]
    # load data in numpy format from h5 file
    train_x = np.vstack(
        [train_h5[_EXAMPLE][client_id][_IMGAE][()] for client_id in train_ids]
    )
    train_y = np.vstack(
        [train_h5[_EXAMPLE][client_id][_LABEL][()] for client_id in train_ids]
    ).squeeze()
    test_x = np.vstack(
        [test_h5[_EXAMPLE][client_id][_IMGAE][()] for client_id in test_ids]
    )
    test_y = np.vstack(
        [test_h5[_EXAMPLE][client_id][_LABEL][()] for client_id in test_ids]
    ).squeeze()
    # dataloader
    train_ds = data.TensorDataset(
        torch.tensor(train_x), torch.tensor(train_y, dtype=torch.long)
    )
    train_dl = data.DataLoader(
        dataset=train_ds, batch_size=train_bs, shuffle=True, drop_last=True
    )
    test_ds = data.TensorDataset(
        torch.tensor(test_x), torch.tensor(test_y, dtype=torch.long)
    )
    test_dl = data.DataLoader(
        dataset=test_ds, batch_size=test_bs, shuffle=True, drop_last=False
    )
    train_h5.close()
    test_h5.close()
    return train_dl, test_dl