code: def _determine_memory_order(shape, strides, dtype, default="C"):
      """
      Given strides, shape and dtype for an array, return memory order
  
      If order is neither C nor F contiguous, return None. If array is both C and
      F contiguous, return default if given or 'C' otherwise.
      """
      if strides is None:
          return "C"
      if len(shape) < 2:
          return "C" if default in (None, "K") else default
      shape = host_xpy.array(shape)
      strides = host_xpy.array(strides)
      itemsize = host_xpy.dtype(dtype).itemsize
      c_contiguous = False
      f_contiguous = False
      if strides[-1] == itemsize:
          if host_xpy.all(strides[:-1] == shape[1:] * strides[1:]):
              c_contiguous = True
      if strides[0] == itemsize:
          if host_xpy.all(strides[1:] == shape[:-1] * strides[:-1]):
              f_contiguous = True
      if c_contiguous and f_contiguous:
          return "C" if default in (None, "K") else default
      elif c_contiguous:
          return "C"
      elif f_contiguous:
          return "F"
      return None
  
imports: import copy
  import operator
  import pickle
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.logger import debug
  from cuml.internals.mem_type import MemoryType, MemoryTypeError
  from cuml.internals.memory_utils import class_with_cupy_rmm, with_cupy_rmm
  from cuml.internals.safe_imports import cpu_only_import, cpu_only_import_from, gpu_only_import, gpu_only_import_from, null_decorator, return_false, safe_import, safe_import_from
  from typing import Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: _determine_memory_order(shape, strides, dtype, default) and returns: None, str, unknown, unknown, str, str