code: def _global_mesh_defined() -> bool:
      """Checks if global xmap/pjit mesh resource environment is defined."""
      maps_env = maps.thread_resources.env
      return maps_env.physical_mesh.devices.shape != ()
  
imports: import abc
  import functools
  from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar, Union
  import jax
  from jax.experimental import maps
  from flax import errors, struct
label_desc: Use image node_id 7 for calling a global function with example usage: _global_mesh_defined() and returns: unknown