code: def arg_to_array(func):
      """
      Decorator to convert argument to array.
  
      Parameters
      ----------
      func : function
          The function to decorate.
  
      Returns
      -------
      func : function
          The decorated function.
      """
  
      @wraps(func)
      def fn(self, arg, *args, **kwargs):
          """Function
  
          Parameters
          ----------
          arg : array-like
              Argument to convert.
          *args : tuple
              Arguments.
          **kwargs : dict
              Keyword arguments.
  
          Returns
          -------
          value : object
              The return value of the function.
          """
          return func(self, np.array(arg), *args, **kwargs)
  
      return fn
  
file_path: vispy/vispy/visuals/transforms/_util.py
imports: from __future__ import division
  import functools
  import numpy
  from ...util import logger
  from functools import wraps
label_desc: Use image node_id 1 for calling a global function with example usage: arg_to_array(func) and returns: fn, func