docstr: Ensure that our version is PEP 440-compliant.
docstr_tok: ["Ensure","that","our","version","is","PEP","440-compliant","."]
code: def test_valid_pep440_version(self):
      """Ensure that our version is PEP 440-compliant."""
      # pkg_resources.parse_version() doesn't have a public return type,
      # so we get a handle to it by parsing known good and bad versions.
      #
      # Note: depending on the version of the module (which is bundled
      # with setuptools), when called with a non-compliant version, it
      # either returns a `LegacyVersion` (setuptools < 66) or raises an
      # `InvalidVersion` exception (setuptools >= 66). Handle both cases.
      compliant_version = pkg_resources.parse_version("1.0.0")
      try:
          legacy_version = pkg_resources.parse_version(
              "arbitrary string"
          )
      except Exception:
          legacy_version = None
      self.assertNotEqual(type(compliant_version), type(legacy_version))
  
      tensorboard_version = pkg_resources.parse_version(version.VERSION)
      self.assertIsInstance(
          tensorboard_version, type(compliant_version)
      )
  
imports: import pkg_resources
  from tensorboard import test
  from tensorboard import version
label_desc: Use image node_id 1 for calling the VersionTest obj's underlying member method code with example usage: obj.test_valid_pep440_version() without return types