code: def _ari_eval_fn(predictions, targets=None, metrics=None):
      if not _validate_text_data(
          predictions, "ari", predictions_col_specifier
      ):
          return
  
      try:
          import textstat
      except ImportError:
          _logger.warning(
              "Failed to load automated readability index metric, skipping metric logging."
          )
          return
  
      scores = [
          textstat.automated_readability_index(prediction)
          for prediction in predictions
      ]
      return MetricValue(
          scores=scores,
          aggregate_results=standard_aggregations(scores),
      )
  
imports: import functools
  import logging
  import os
  import numpy
  from mlflow.metrics.base import MetricValue, standard_aggregations
label_desc: Use image node_id 8 for calling a global function with example usage: _ari_eval_fn(predictions, targets, metrics) and returns: MetricValue