code: def convert_version_to_int(version):
      """Convert a version number to a integer that can be used to compare.
  
      Version strings of the form X.YZ and X.Y.Z-xxxxx are supported. The
      'xxxxx' part, for instance 'homebrew' on OS/X, is ignored.
  
      Args:
        version: a version to be converted
  
      Returns:
        An integer if converted successfully, otherwise return None.
      """
      version = version.split("-")[0]
      version_segments = version.split(".")
      # Treat "0.24" as "0.24.0"
      if len(version_segments) == 2:
          version_segments.append("0")
      for seg in version_segments:
          if not seg.isdigit():
              return None
  
      version_str = "".join(
          ["%03d" % int(seg) for seg in version_segments]
      )
      return int(version_str)
  
imports: import argparse
  import errno
  import glob
  import json
  import os
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 20 for calling a global function with example usage: convert_version_to_int(version) and returns: int, None