class_docstr: Dataset class for NCF
class_docstr_tok: ["Dataset","class","for","NCF"]
docstr: Generator for serving batches of test data for leave-one-out evaluation. Data is loaded from test_file_full.
  
  Args:
      yield_id (bool): If true, return assigned user and item IDs, else return original values.
  
  Returns:
      list
docstr_tok: ["Generator","for","serving","batches","of","test","data","for","leave-one-out","evaluation",".","Data","is","loaded","from","test_file_full",".","Args",":","yield_id","(","bool",")",":","If","true",",","return","assigned","user","and","item","IDs",",","else","return","original","values",".","Returns",":","list"]
code: def test_loader(self, yield_id=False):
      """Generator for serving batches of test data for leave-one-out evaluation. Data is loaded from test_file_full.
  
      Args:
          yield_id (bool): If true, return assigned user and item IDs, else return original values.
  
      Returns:
          list
      """
      prepare_batch = (
          self._prepare_batch_with_id
          if yield_id
          else self._prepare_batch_without_id
      )
  
      with self.test_full_datafile as test_full_datafile:
          for test_batch_idx in test_full_datafile.batch_indices_range:
              test_batch_data = test_full_datafile.load_data(
                  test_batch_idx, by_user=False
              )
              yield prepare_batch(test_batch_data)
  
imports: import os
  from collections import OrderedDict
  import random
  import numpy
  import pandas
  import csv
  import logging
  from tqdm import tqdm
  from recommenders.utils.constants import DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_RATING_COL
label_desc: Use image node_id 9 for calling the Dataset obj's underlying member method code with example usage: obj.test_loader(yield_id) without return types