@classmethod<EOL><INDENT>def from_versions(cls, versions):<DEDENT>
range = cls(None)<EOL>range.bounds = []<EOL>for version in dedup(sorted(versions)):<EOL><INDENT>lower = _LowerBound(version, True)<EOL>upper = _UpperBound(version, True)<EOL>bound = _Bound(lower, upper)<EOL>range.bounds.append(bound)<EOL><DEDENT>return range<EOL>
Create a range from a list of versions.

        This method creates a range that contains only the given versions and
        no other. Typically the range looks like (for eg) "==3|==4|==5.1".

        Args:
            versions: List of Version objects.

        Returns:
            `VersionRange` object.