class_docstr: CIDEr scorer.
class_docstr_tok: ["CIDEr","scorer","."]
code: def compute_score(self, df_mode, option=None, verbose=0):
      # compute idf
      if df_mode == "corpus":
          self.compute_doc_freq()
          # pdb.set_trace()
          # docFreq = {}
          # docFreq['df'] = self.document_frequency
          # docFreq['ref_len'] = len(self.crefs)
          # pickle.dump(docFreq, open('noc_test_freq.p', 'w'))
          # pdb.set_trace()
          # assert to check document frequency
          assert len(self.ctest) >= max(
              self.document_frequency.values()
          )
      else:
          docFreq = pickle.load(
              open(
                  os.path.join(
                      "tools/coco-caption/data", df_mode + ".p"
                  ),
                  "r",
              )
          )
          self.document_frequency = docFreq["df"]
          # TODO: make this a part of coco-val-df
          self.ref_len = np.log(float(docFreq["ref_len"]))
  
      # compute cider_tool score
      score = self.compute_cider(df_mode)
      # debug
      # print score
      return np.mean(np.array(score)), np.array(score)
  
file_path: graph4nlp/graph4nlp/pytorch/modules/evaluation/cider_tool/cider_scorer.py
imports: import copy
  import math
  import os
  import sys
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 8 for calling the CiderScorer obj's underlying member method code with example usage: obj.compute_score(df_mode, option, verbose) and returns: np,  np