code: def _swap_bytes(data):
      
  
      a, b = data[1::2], data[::2]
      data = bytearray().join(bytearray(x) for x in zip(a, b))
      if len(b) > len(a):
          data += b[-1:]
      return bytes(data)
docs: swaps bytes for 16 bit, leaves remaining trailing bytes alone