code: def get_word(byte_iterator):
      
      byte_values = list(itertools.islice(byte_iterator, 2))
      try:
          word = (byte_values[0] << 8) | byte_values[1]
      except TypeError, err:
          raise TypeError("Can't build word from %s: %s" % (repr(byte_values), err))
      return word
docs: return a uint16 value
  
      >>> g=iter([0x1e, 0x12])
      >>> v=get_word(g)
      >>> v
      7698
      >>> hex(v)
      '0x1e12'