code: def get_int(bytearray_, byte_index):
      
      data = bytearray_[byte_index:byte_index + 2]
      data[1] = data[1] & 0xff
      data[0] = data[0] & 0xff
      packed = struct.pack('2B', *data)
      value = struct.unpack('>h', packed)[0]
      return value
docs: Get int value from bytearray.
  
      int are represented in two bytes