old_contents: import sys
  
  def GenerateTraceURLId(idLong):
      hexStr = ''
  
      hexStr += format(idLong >> 56 & 0xff, 'x')
      hexStr += format(idLong >> 48 & 0xff, 'x')
      hexStr += format(idLong >> 40 & 0xff, 'x')
      hexStr += format(idLong >> 32 & 0xff, 'x')
      hexStr += format(idLong >> 24 & 0xff, 'x')
      hexStr += format(idLong >> 16 & 0xff, 'x')
      hexStr += format(idLong >>  8 & 0xff, 'x')
      hexStr += format(idLong       & 0xff, 'x')
  
      return hexStr
  
  def ParseTraceURLId(hexString):
      return int(hexString, 16)
  
new_contents: import sys
  
  def GenerateTraceURLId(idLong):
      return hex(idLong)
  
  def ParseTraceURLId(hexString):
      return long(hexString, 16)
  
subject: simplify hex / long conversions