code: def _order_to_strides(order, shape, dtype):
      """
      Given memory order, shape and dtype, return expected strides
      """
      dtype = host_xpy.dtype(dtype)
      if order == "C":
          strides = (
              host_xpy.append(
                  host_xpy.cumprod(host_xpy.array(shape[:0:-1]))[::-1],
                  1,
              )
              * dtype.itemsize
          )
      elif order == "F":
          strides = (
              host_xpy.cumprod(host_xpy.array([1, *shape[:-1]]))
              * dtype.itemsize
          )
      else:
          raise ValueError(
              "Must specify strides or order, and order must"
              ' be one of "C" or "F"'
          )
      return strides
  
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 1 for calling a global function with example usage: _order_to_strides(order, shape, dtype) and returns: strides