code: def _other_endian(typ):
      """Return the type with the 'other' byte order.  Simple types like
      c_int and so on already have __ctype_be__ and __ctype_le__
      attributes which contain the types, for more complicated types
      arrays and structures are supported.
      """
      # check _OTHER_ENDIAN attribute (present if typ is primitive type)
      if hasattr(typ, _OTHER_ENDIAN):
          return getattr(typ, _OTHER_ENDIAN)
      # if typ is array
      if isinstance(typ, _array_type):
          return _other_endian(typ._type_) * typ._length_
      # if typ is structure
      if issubclass(typ, Structure):
          return typ
      raise TypeError(
          "This type does not support other endian: %s" % typ
      )
  
file_path: cpython/Lib/ctypes/_endian.py
imports: import sys
  from ctypes import Array, Structure, Union
label_desc: Use image node_id 1 for calling a global function with example usage: _other_endian(typ) and returns: getattr, unknown, typ