<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cmp(cls, v1: 'VersionBase', v2: 'VersionBase') -> int: """ Compares two instances. """

        # TODO types checking
        if v1._version > v2._version:
            return 1
        elif v1._version == v2._version:
            return 0
        else:
            return -1