code: def get_test_fold(data, fold):
      print("Getting test fold %d..." % fold)
      l = int(len(data) * 0.1 * fold)
      r = int(len(data) * 0.1 * (fold + 1))
      new_js = []
      new_docs = []
      for i in range(len(data)):
          if i >= l and i < r:
              new_js.append(data.js[i])
              new_docs.append(data.documents[i])
      print("# documents: %d --> %d" % (len(data), len(new_docs)))
      data.js = new_js
      data.documents = new_docs
      return data
  
file_path: DeepKE/example/triple/PURE/models/entityUtils.py
imports: import numpy
  import json
  import logging
label_desc: Use image node_id 5 for calling a global function with example usage: get_test_fold(data, fold) and returns: data