code: def to_np_array(a):
      """
      Helper function to convert tuple or list to np.ndarray.
      Parameters
      ----------
      a : Tuple, list or np.ndarray
          The object to transform.
      Returns
      -------
      The np.ndarray.
      Raises
      ------
      ValueError
          If a is not a valid type.
      """
      if not is_array_like(a):
          raise ValueError("Unable to convert to np.ndarray!")
  
      return np.array(a)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from .None import distanceProfile
  from .None import order
  from .utils import mass, movmeanstd
  import numpy
  import multiprocessing
  from functools import partial
  import math
  from .scrimp import scrimp_plus_plus
label_desc: Use image node_id 2 for calling a global function with example usage: to_np_array(a) and returns: np