code: def create_total_no_correct_hist(
      files: Sequence[Path], questions: dict, outdir: Path
  ):
      """
      Plot histogram of no. times each question was correctly answered
      """
      questions_total_correct = {
          k: sum(v) for k, v in questions.items()
      }
      all_totals = [i for i in questions_total_correct.values()]
  
      plt.hist(
          all_totals,
          bins=[i - 0.5 for i in range(len(files) + 2)],
          width=0.9,
      )
      plt.xticks(range(len(files) + 1))
      plt.xlabel("No. correct answers for a question")
      plt.ylabel("Frequency")
  
      outpath = os.path.join(outdir, "consistency.png")
      plt.savefig(outpath)
      plt.show()
  
file_path: evals/evals/elsuite/sandbagging/scripts/consistency_plots.py
imports: import argparse
  import glob
  import json
  import os
  from pathlib import Path
  from typing import Sequence
  import matplotlib.pyplot
label_desc: Use image node_id 4 for calling a global function with example usage: create_total_no_correct_hist(files, questions, outdir) without return types