this is sort of an odd pattern. i sort of think it's cleaner if you have something like the following (with appropriate existence checks):

    return {
        "image": CommCareImage,
        "audio": CommCareAudio,
    }[data.get_base_mimetype()

and
    def get_base_mimetype(self):
        return self.mimetype.split("/")[0]

though maybe you had a good reason for doing it this way?