def read_element_id(stream):
 char = _read(stream, 1)
 byte = ord(char)
 if (byte & 128):
  return byte
 elif (byte & 64):
  return unpack('>H', (char + _read(stream, 1)))[0]
 elif (byte & 32):
  (b, h) = unpack('>BH', (char + _read(stream, 2)))
  return ((b * (2 ** 16)) + h)
 elif (byte & 16):
  return unpack('>L', (char + _read(stream, 3)))[0]
 else:
  ValueError('Not an Element ID')

def read_element_id ( stream ) : char = _read ( stream , 1 ) byte = ord ( char ) if ( byte & 128 ) : return byte elif ( byte & 64 ) : return unpack ( '>H' , ( char + _read ( stream , 1 ) ) ) [ 0 ] elif ( byte & 32 ) : ( b , h ) = unpack ( '>BH' , ( char + _read ( stream , 2 ) ) ) return ( ( b * ( 2 ** 16 ) ) + h ) elif ( byte & 16 ) : return unpack ( '>L' , ( char + _read ( stream , 3 ) ) ) [ 0 ] else : ValueError ( 'Not an Element ID' )
read the element id .