code: def global_metric(
      predictions, *, score_column="prediction", metric=rmse, **kwargs
  ):
      """
      Compute a global prediction accuracy metric for a set of predictions.
  
      Args:
          predictions(pandas.DataFrame):
              Data frame containing the predictions.  Must have a column ``rating``
              containing ground truth and a score column with rating predictions.
          score_column(str):
              The name of the score column (defaults to ``'prediction'``).
          metric(function):
              A metric function of two parameters (prediction and truth).  Defaults
              to :py:func:`rmse`.
  
      Returns:
          float: The global metric value.
      """
  
      scores = predictions[score_column]
      truth = predictions["rating"]
      return metric(scores, truth, **kwargs)
  
imports: import numpy
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: global_metric(predictions) and returns: metric