code: def sanitize_rec(self, rec):
          
          opcode = rec['opcode']
          canonical_op = op_canonicalize(opcode, rec)
  
          # don't return internally-used quirk fields
          quirk_fields = op_get_quirk_fields(opcode)
          for f in quirk_fields:
              if f in canonical_op:
                  del canonical_op[f]
  
          # if we have a 'token_fee', make it a string
          if 'token_fee' in canonical_op:
              canonical_op['token_fee'] = str(canonical_op['token_fee'])
  
          canonical_op['opcode'] = opcode
          return canonical_op
docs: sanitize a name/namespace record before returning it.
          * canonicalize it
          * remove quirk fields