def verify_header(pkt):
 if (endian_int(pkt[0:3]) is 1):
  if (int(pkt[3], 16) is 1):
   return True
 return False

def verify_header ( pkt ) : if ( endian_int ( pkt [ 0 : 3 ] ) is 1 ) : if ( int ( pkt [ 3 ] , 16 ) is 1 ) : return True return False
not all packets have a mysql header .