code: def _flattens_y(func):
      @wraps(func)
      def wrapper(y_true, y_pred, *args, **kwargs):
          y_true_flat = flatten(y_true)
          y_pred_flat = flatten(y_pred)
          return func(y_true_flat, y_pred_flat, *args, **kwargs)
  
      return wrapper
  
file_path: sklearn-crfsuite/sklearn_crfsuite/metrics.py
imports: from __future__ import absolute_import, division
  from functools import wraps
  from sklearn_crfsuite.utils import flatten
label_desc: Use image node_id 1 for calling a global function with example usage: _flattens_y(func) and returns: wrapper, func