Compares the MIME::Type based on how reliable it is before doing a
        normal <=> comparison. Used by MIME::Types#[] to sort types. The
        comparisons involved are:
        1. self.simplified <=> other.simplified (ensures that we
           don't try to compare different types)
        2. IANA-registered definitions < other definitions.
        3. Generic definitions < platform definitions.
        3. Complete definitions < incomplete definitions.
        4. Current definitions < obsolete definitions.
        5. Obselete with use-instead references < obsolete without.
        6. Obsolete use-instead definitions are compared.

def priority_compare(self, other):
        """
        Compares the MIME::Type based on how reliable it is before doing a
        normal <=> comparison. Used by MIME::Types#[] to sort types. The
        comparisons involved are:
        1. self.simplified <=> other.simplified (ensures that we
           don't try to compare different types)
        2. IANA-registered definitions < other definitions.
        3. Generic definitions < platform definitions.
        3. Complete definitions < incomplete definitions.
        4. Current definitions < obsolete definitions.
        5. Obselete with use-instead references < obsolete without.
        6. Obsolete use-instead definitions are compared.
        """
        pc = cmp(self.simplified, other.simplified)
        if pc is 0:
            if self.is_registered != other.is_registered:
                # registered < unregistered
                pc = -1 if self.is_registered else 1
            elif self.platform != other.platform:
                # generic < platform
                pc = 1 if self.platform else -1
            elif self.is_complete != other.is_complete:
                # complete < incomplete
                pc = -1 if self.is_complete else 1
            elif self.is_obsolete != other.is_obsolete:
                # current < obsolete
                pc = 1 if self.is_obsolete else -1
            if pc is 0 and self.is_obsolete and (self.use_instead != other.use_instead):
                if self.use_instead is None:
                    pc = -1
                elif other.use_instead is None:
                    pc = 1
                else:
                    pc = cmp(self.use_instead, other.use_instead)
        return pc