code: def _get_legacy_path(env_name, default=[]):
      """Returns a path specified by a legacy environment variable.
  
      CUDNN_INSTALL_PATH, NCCL_INSTALL_PATH, TENSORRT_INSTALL_PATH set to
      '/usr/lib/x86_64-linux-gnu' would previously find both library and header
      paths. Detect those and return '/usr', otherwise forward to _list_from_env().
      """
      if env_name in os.environ:
          match = re.match(
              "^(/[^/ ]*)+/lib/\w+-linux-gnu/?$", os.environ[env_name]
          )
          if match:
              return [match.group(1)]
      return _list_from_env(env_name, default)
  
imports: import io
  import os
  import glob
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 23 for calling a global function with example usage: _get_legacy_path(env_name, default) and returns: _list_from_env, list