'Matches the version object.
Returns whether the version object represents a version
greater than or equal to the minimum version and less than
or equal to the maximum version.
:param min_version: Minimum acceptable version.
:param max_version: Maximum acceptable version.
:returns: boolean
If min_version is null then there is no minimum limit.
If max_version is null then there is no maximum limit.
If self is null then raise ValueError'

def matches(self, min_version, max_version):

    if self.is_null():
        raise ValueError(_("Null    APIVersion    doesn't    support    'matches'."))
    if (max_version.is_null() and min_version.is_null()):
        return True
    elif max_version.is_null():
        return (min_version <= self)
    elif min_version.is_null():
        return (self <= max_version)
    else:
        return (min_version <= self <= max_version)
