code: def array(metric):
      """
      Decorate metric to convert annotations and detections to numpy arrays.
  
      """
  
      @wraps(metric)
      def float_array(detections, annotations, *args, **kwargs):
          """Warp detections and annotations as numpy arrays."""
          # make sure the annotations and detections have a float dtype
          detections = np.asarray(detections, dtype=float)
          annotations = np.asarray(annotations, dtype=float)
          return metric(detections, annotations, *args, **kwargs)
  
      return float_array
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  from functools import wraps
  import numpy
  from .None import MeanEvaluation, calc_absolute_errors, calc_errors, evaluation_io, find_closest_matches
  from .onsets import OnsetEvaluation
label_desc: Use image node_id 1 for calling a global function with example usage: array(metric) and returns: float_array, metric