def getProtocolId(packet):
 if isinstance(packet, list):
  return unpack('>H', pack('BB', *packet[2:4]))[0]
 else:
  return unpack('>H', packet[2:4])[0]

def getProtocolId ( packet ) : if isinstance ( packet , list ) : return unpack ( '>H' , pack ( 'BB' , * packet [ 2 : 4 ] ) ) [ 0 ] else : return unpack ( '>H' , packet [ 2 : 4 ] ) [ 0 ]
pulls out the transaction id of the packet .