import ctypes


def _get_word(array, index):
  """ Shorthand for getting two byte values in an array.
  Args:
    array: The array the get stuff from.
    index: The start index of the word to get.
  Returns:
    A c_ushort containing the value of the word. """
  value = ctypes.c_ushort(array[index] << 8)
  value.value |= array[index + 1]

  return value