code: def RegisterTXXXKey(cls, key, desc):
          
          frameid = "TXXX:" + desc
  
          def getter(id3, key):
              return list(id3[frameid])
  
          def setter(id3, key, value):
              enc = 0
              # Store 8859-1 if we can, per MusicBrainz spec.
              for v in value:
                  if v and max(v) > u'\x7f':
                      enc = 3
                      break
  
              id3.add(mutagen.id3.TXXX(encoding=enc, text=value, desc=desc))
  
          def deleter(id3, key):
              del(id3[frameid])
  
          cls.RegisterKey(key, getter, setter, deleter)
docs: Register a user-defined text frame key.
  
          Some ID3 tags are stored in TXXX frames, which allow a
          freeform 'description' which acts as a subkey,
          e.g. TXXX:BARCODE.::
  
              EasyID3.RegisterTXXXKey('barcode', 'BARCODE').