docstr: Method to write final ranking
docstr_tok: ["Method","to","write","final","ranking"]
code: def write_predictions(self):
      """
      Method to write final ranking
  
      """
  
      if self.output_file is not None:
          WriteFile(
              self.output_file, data=self.predictions, sep=self.sep
          ).write()
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/base_rating_prediction.py
imports: from scipy.spatial.distance import squareform, pdist
  import numpy
  from caserec.evaluation.rating_prediction import RatingPredictionEvaluation
  from caserec.utils.extra_functions import print_header
  from caserec.utils.process_data import ReadFile, WriteFile
label_desc: Use image node_id 6 for calling the BaseRatingPrediction obj's underlying member method code with example usage: obj.write_predictions() without return types