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

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