<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_class(class_key):
 """Form a music service data structure class from the class key Args: class_key (str):
 A concatenation of the base class (e.g. MediaMetadata) and the class name Returns: class: Subclass of MusicServiceItem """

    if class_key not in CLASSES:
        for basecls in (MediaMetadata, MediaCollection):
            if class_key.startswith(basecls.__name__):
                # So MediaMetadataTrack turns into MSTrack
                class_name = 'MS' + class_key.replace(basecls.__name__, '')
                if sys.version_info[0] == 2:
                    class_name = class_name.encode('ascii')
                CLASSES[class_key] = type(class_name, (basecls,), {})
                _LOG.info('Class %s created', CLASSES[class_key])
    return CLASSES[class_key]