code: def ensure_python(specs):
      """Given a list of range specifiers for python, ensure compatibility."""
      if not isinstance(specs, (list, tuple)):
          specs = [specs]
      v = sys.version_info
      part = "%s.%s" % (v.major, v.minor)
      for spec in specs:
          if part == spec:
              return
          try:
              if eval(part + spec):
                  return
          except SyntaxError:
              pass
      raise ValueError("Python version %s unsupported" % part)
  
imports: from collections import defaultdict
  from os.path import join
  import io
  import os
  import functools
  import pipes
  import re
  import shlex
  import subprocess
  import sys
  from setuptools import Command
  from setuptools.command.build_py import build_py
  from setuptools.command.sdist import sdist
  from distutils import log
  from setuptools.command.develop import develop
  from setuptools.command.bdist_egg import bdist_egg
label_desc: Use image node_id 2 for calling a global function with example usage: ensure_python(specs) without return types