def METHOD_NAME(self, other):
    if not isinstance(other, StrictVersion):
        return NotImplemented
    if isinstance(other, GlobVersion):
        # This would require some extra handling. Since this type of
        # comparison isn't currently needed, explicitly do not handle it.
        return NotImplemented
    if len(other.version) < len(self.version):
        # StrictVersions should have a version tuple that is 3 elements
        # long, whereas PinVersions should have a version tuple 1 or 2
        # elements long. It's conceivable that we could subclass
        # StrictVersion in a way that breaks this assumption, in which case
        # we would need to determine what it means to compare, for example,
        # PinVersion("100.0.") and StrictVersion("100").
        raise ValueError("len(StrictVersion.version) is expected to be 3.")
    other_trimmed_version = other.version[: len(self.version)]
    if self.version < other_trimmed_version:
        return -1
    elif self.version > other_trimmed_version:
        return 1
    return 0