docstr: Method to write final ranking
docstr_tok: ["Method","to","write","final","ranking"]
code: def write_ranking(self):
      """
      Method to write final ranking
  
      """
  
      if self.output_file is not None:
          WriteFile(
              self.output_file, data=self.ranking, sep=self.sep
          ).write()
  
file_path: CaseRecommender/caserec/recommenders/item_recommendation/base_item_recommendation.py
imports: from scipy.spatial.distance import squareform, pdist
  import numpy
  from caserec.evaluation.item_recommendation import ItemRecommendationEvaluation
  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 BaseItemRecommendation obj's underlying member method code with example usage: obj.write_ranking() without return types