code: def _check_array(
      array,
      dtype="numeric",
      accept_sparse=False,
      order=None,
      copy=False,
      force_all_finite=True,
      ensure_2d=True,
      accept_large_sparse=True,
  ):
      if force_all_finite:
          if sp.issparse(array):
              if hasattr(array, "data"):
                  _assert_all_finite(array.data)
                  force_all_finite = False
          else:
              _assert_all_finite(array)
              force_all_finite = False
      array = check_array(
          array=array,
          dtype=dtype,
          accept_sparse=accept_sparse,
          order=order,
          copy=copy,
          force_all_finite=force_all_finite,
          ensure_2d=ensure_2d,
          accept_large_sparse=accept_large_sparse,
      )
  
      if sp.issparse(array):
          return array
  
      # TODO: Convert this kind of arrays to a table like in daal4py
      if not array.flags.aligned and not array.flags.writeable:
          array = np.array(array.tolist())
  
      # TODO: If data is not contiguous copy to contiguous
      # Need implemeted numpy table in oneDAL
      if not array.flags.c_contiguous and not array.flags.f_contiguous:
          array = np.ascontiguousarray(array, array.dtype)
      return array
  
imports: import warnings
  from collections.abc import Sequence
  from numbers import Integral
  import numpy
  from scipy import sparse
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils.validation import check_array
  from daal4py.sklearn.utils.validation import _assert_all_finite
label_desc: Use image node_id 6 for calling a global function with example usage: _check_array(array, dtype, accept_sparse, order, copy, force_all_finite, ensure_2d, accept_large_sparse) and returns: array, array