code: def test_byte_orders():
      arr = np.arange(10, dtype=np.int32)
      # Test endian read/write of types not requiring scaling
      for tp in (np.uint64, np.float64, np.complex128):
          dt = np.dtype(tp)
          for code in "<>":
              ndt = dt.newbyteorder(code)
              for klass in (
                  SlopeInterArrayWriter,
                  SlopeArrayWriter,
                  ArrayWriter,
              ):
                  aw = klass(arr, ndt)
                  data_back = round_trip(aw)
                  assert_array_almost_equal(arr, data_back)
  
imports: import itertools
  from io import BytesIO
  from platform import machine, python_compiler
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..arraywriters import ArrayWriter, ScalingError, SlopeArrayWriter, SlopeInterArrayWriter, WriterError, get_slope_inter, make_array_writer
  from ..casting import int_abs, sctypes, shared_range, type_info
  from ..testing import assert_allclose_safely, suppress_warnings
  from ..volumeutils import _dt_min_max, apply_read_scaling, array_from_file
label_desc: Use image node_id 16 for calling a global function with example usage: test_byte_orders() without return types