code: def log_likelihood(reference, test):
      """
      Given a list of reference values and a corresponding list of test
      probability distributions, return the average log likelihood of
      the reference values, given the probability distributions.
  
      :param reference: A list of reference values
      :type reference: list
      :param test: A list of probability distributions over values to
          compare against the corresponding reference values.
      :type test: list(ProbDistI)
      """
      if len(reference) != len(test):
          raise ValueError("Lists must have the same length.")
  
      # Return the average value of dist.logprob(val).
      total_likelihood = sum(
          dist.logprob(val) for (val, dist) in zip(reference, test)
      )
      return total_likelihood / len(reference)
  
file_path: nltk/nltk/metrics/scores.py
imports: import operator
  from functools import reduce
  from math import fabs
  from random import shuffle
  from nltk.util import LazyConcatenation, LazyMap
label_desc: Use image node_id 5 for calling a global function with example usage: log_likelihood(reference, test) and returns: unknown