code: def _ensure_np_array(x):
      if isinstance(x, np.ndarray):
          return x
      if isinstance(x, pd_DataFrame) | isinstance(x, pd_Series):
          return x.values
      else:
          raise ValueError("Can't cast to numpy array")
  
imports: from .compat import pd_DataFrame, pd_Series, pd_read_parquet
  import numpy
  from numpy.random import RandomState
  import blosc
  import dill
  from typing import Union, List, Dict, Optional
label_desc: Use image node_id 11 for calling a global function with example usage: _ensure_np_array(x) and returns: x, x