code: def _get_ld_config_paths():
      """Returns all directories from 'ldconfig -p'."""
      if not _is_linux():
          return []
      ldconfig_path = which("ldconfig") or "/sbin/ldconfig"
      output = subprocess.check_output([ldconfig_path, "-p"])
      pattern = re.compile(".* => (.*)")
      result = set()
      for line in output.splitlines():
          try:
              match = pattern.match(line.decode("ascii"))
          except UnicodeDecodeError:
              match = False
          if match:
              result.add(os.path.dirname(match.group(1)))
      return sorted(list(result))
  
imports: import io
  import os
  import glob
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 8 for calling a global function with example usage: _get_ld_config_paths() and returns: sorted, list