code: def _asarray(arr, dtype=None, order=None):
      # np.asarray does not take "K" and "A" orders in version 1.3.0
      if order in ("K", "A", None):
          if (arr.itemsize == 1 and dtype in (bool, np.bool_)) or (
              arr.dtype in (bool, np.bool_)
              and np.dtype(dtype).itemsize == 1
          ):
              ret = arr.view(dtype=dtype)
          else:
              ret = np.asarray(arr, dtype=dtype)
      else:
          if (
              (arr.itemsize == 1 and dtype in (bool, np.bool_))
              or (
                  arr.dtype in (bool, np.bool_)
                  and np.dtype(dtype).itemsize == 1
              )
          ) and (
              order == "F"
              and arr.flags["F_CONTIGUOUS"]
              or order == "C"
              and arr.flags["C_CONTIGUOUS"]
          ):
              ret = arr.view(dtype=dtype)
          else:
              ret = np.asarray(arr, dtype=dtype, order=order)
  
      return ret
  
imports: import csv
  import numpy
  from .helpers import stringify_path
label_desc: Use image node_id 1 for calling a global function with example usage: _asarray(arr, dtype, order) and returns: ret