code: def _set_order(args, order):
      ivy.utils.assertions.check_elem_in_list(
          order,
          ["C", "F", "A", "K", None],
          message="order must be one of 'C', 'F', 'A', or 'K'",
      )
      if order in ["K", "A", None]:
          check_order = ivy.nested_map(
              _check_C_order,
              args,
              include_derived={"tuple": True},
              shallow=False,
          )
          if all(v is None for v in check_order) or any(
              ivy.multi_index_nest(
                  check_order, ivy.all_nested_indices(check_order)
              )
          ):
              order = "C"
          else:
              order = "F"
      return order
  
imports: import functools
  from typing import Callable, Any
  import inspect
  import platform
  import ivy
  import ivy.functional.frontends.numpy
label_desc: Use image node_id 12 for calling a global function with example usage: _set_order(args, order) and returns: order