code: def get_nccl_version(formatted=False):
      """Return NCCL version cached in check_nccl_version()."""
      global _nccl_version
      if _nccl_version is None:
          msg = "check_nccl_version() must be called first."
          raise RuntimeError(msg)
      if formatted:
          if _nccl_version == 0:
              return "1.x"
          return str(_nccl_version)
      return _nccl_version
  
imports: import contextlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import List, Set
  import cupy_builder
  import cupy_builder.install_utils
  from cupy_builder import _environment
  from cupy_builder._context import Context
label_desc: Use image node_id 19 for calling a global function with example usage: get_nccl_version(formatted) and returns: _nccl_version, str, str