code: def get_topology_desc(
      topology_name: str = "", platform: str | None = None, **kwargs
  ) -> TopologyDescription:
      if platform == "tpu" or platform is None:
          return TopologyDescription(
              xb.make_pjrt_tpu_topology(
                  topology_name, **kwargs
              )._make_compile_only_devices()
          )
      raise NotImplementedError(
          "get_topology_desc(platform=%s) is not implemented"
          % repr(platform)
      )
  
file_path: jax/jax/experimental/topologies.py
imports: from __future__ import annotations
  import abc
  from collections.abc import Sequence
  from typing import Optional
  import jax
  from jax.experimental import mesh_utils
  from jax._src.lib import xla_client
  from jax._src import xla_bridge
label_desc: Use image node_id 2 for calling a global function with example usage: get_topology_desc(topology_name, platform) and returns: TopologyDescription