code: def _get_pjrt_plugin_names_and_library_paths(
      plugins_from_env: str,
  ) -> dict[str, str]:
      """Gets the names and library paths of PJRT plugins to load from env var.
  
      Args:
        plugins_from_env: plugin name and paths from env var. It is in the format
          of 'name1:path1,name2:path2' ('name1;path1,name2;path2' for windows).
  
      Returns:
        A dict of {plugin_name: library path} for the PJRT plugins to load.
      """
      if not plugins_from_env:
          return {}
  
      pjrt_plugins = {}
      for plugin in plugins_from_env.split(","):
          try:
              name, library_path = plugin.split(os.path.pathsep)
              pjrt_plugins[name] = library_path
          except ValueError:
              logger.warning(
                  "invalid value %s in env var PJRT_NAMES_AND_LIBRARY_PATHS %s",
                  plugin,
                  plugins_from_env,
              )
      return pjrt_plugins
  
imports: from __future__ import annotations
  from __future__ import annotations
  from collections.abc import Mapping
  import dataclasses
  from functools import lru_cache, partial
  import importlib
  import json
  import logging
  import os
  import pkgutil
  import platform
  import sys
  import threading
  from typing import Any, Callable, Union
  import warnings
  from jax._src import config
  from jax._src import distributed
  from jax._src import traceback_util
  from jax._src import util
  from jax._src import hardware_utils
  from jax._src.cloud_tpu_init import maybe_import_libtpu
  from jax._src.lib import cuda_versions
  from jax._src.lib import xla_client
  from jax._src.lib import xla_extension
  from jax._src.lib import xla_extension_version
label_desc: Use image node_id 8 for calling a global function with example usage: _get_pjrt_plugin_names_and_library_paths(plugins_from_env) and returns: pjrt_plugins, dict