code: def write_file(self, triples, write_file, score=True):
      with open(write_file, "w") as infile:
          if score:
              for t in triples:
                  infile.write(
                      str(t[0])
                      + self.sep
                      + str(t[1])
                      + self.sep
                      + str(t[2])
                      + "\n"
                  )
          else:
              for t in triples:
                  infile.write(
                      str(t[0])
                      + self.sep
                      + str(t[1])
                      + self.sep
                      + "1.0 \n"
                  )
  
imports: from multiprocessing.pool import Pool
  from random import shuffle
  import numpy
  import os
  from caserec.recommenders.rating_prediction.itemknn import ItemKNN
  from caserec.recommenders.rating_prediction.matrixfactorization import MatrixFactorization
  from caserec.recommenders.rating_prediction.svdplusplus import SVDPlusPlus
  from caserec.recommenders.rating_prediction.userknn import UserKNN
  from caserec.utils.process_data import ReadFile
  from caserec.utils.extra_functions import ComputeBui
label_desc: Use image node_id 12 for calling the ECoRec obj's underlying member method code with example usage: obj.write_file(triples, write_file, score) without return types