code: def _bounds_from_last_device(last_device) -> Sequence[int]:
      """Gets the bound from the given last device."""
      # Must be passed the device at the highest-coordinate corner of the
      # relevant mesh, which is a requirement we know is satisfied by the last
      # device in jax.devices().
      assert hasattr(last_device, "coords"), "Only TPU supported"
      x, y, z = last_device.coords
      return x + 1, y + 1, z + 1, last_device.core_on_chip + 1
  
file_path: jax/jax/experimental/mesh_utils.py
imports: from __future__ import annotations
  import collections
  from collections.abc import Sequence
  import itertools
  import logging
  from typing import Any, Callable, Optional
  import numpy
  from jax._src import xla_bridge
label_desc: Use image node_id 3 for calling a global function with example usage: _bounds_from_last_device(last_device) and returns: unknown,  unknown,  unknown,  unknown