code: def __init__(self, version):
      # type: (str) -> None
      self._version = str(version)
      self._key = _legacy_cmpkey(self._version)
  
      warnings.warn(
          "Creating a LegacyVersion has been deprecated and will be "
          "removed in the next major release",
          DeprecationWarning,
      )
  
imports: from __future__ import absolute_import, division, print_function
  import collections
  import itertools
  import re
  import warnings
  from ._structures import Infinity, NegativeInfinity
  from ._typing import TYPE_CHECKING
label_desc: Use image node_id 1 to create a new LegacyVersion object from inherited base classes: _BaseVersion with example: obj = LegacyVersion(version)