code: def segment_min(
      data: ArrayLike,
      segment_ids: ArrayLike,
      num_segments: int | None = None,
      indices_are_sorted: bool = False,
      unique_indices: bool = False,
      bucket_size: int | None = None,
      mode: lax.GatherScatterMode | None = None,
  ) -> Array:
      """Computes the minimum within segments of an array.
  
      Similar to TensorFlow's `segment_min
      <https://www.tensorflow.org/api_docs/python/tf/math/segment_min>`_
  
      Args:
        data: an array with the values to be reduced.
        segment_ids: an array with integer dtype that indicates the segments of
          `data` (along its leading axis) to be reduced. Values can be repeated and
          need not be sorted. Values outside of the range [0, num_segments) are
          dropped and do not contribute to the result.
        num_segments: optional, an int with nonnegative value indicating the number
          of segments. The default is set to be the minimum number of segments that
          would support all indices in ``segment_ids``, calculated as
          ``max(segment_ids) + 1``.
          Since `num_segments` determines the size of the output, a static value
          must be provided to use ``segment_min`` in a JIT-compiled function.
        indices_are_sorted: whether ``segment_ids`` is known to be sorted.
        unique_indices: whether `segment_ids` is known to be free of duplicates.
        bucket_size: size of bucket to group indices into. ``segment_min`` is
          performed on each bucket separately. Default ``None`` means no bucketing.
        mode: a :class:`jax.lax.GatherScatterMode` value describing how
          out-of-bounds indices should be handled. By default, values outside of the
          range [0, num_segments) are dropped and do not contribute to the sum.
  
      Returns:
        An array with shape :code:`(num_segments,) + data.shape[1:]` representing the
        segment minimums.
  
      Examples:
        Simple 1D segment min:
  
        >>> data = jnp.arange(6)
        >>> segment_ids = jnp.array([0, 0, 1, 1, 2, 2])
        >>> segment_min(data, segment_ids)
        Array([0, 2, 4], dtype=int32)
  
        Using JIT requires static `num_segments`:
  
        >>> from jax import jit
        >>> jit(segment_min, static_argnums=2)(data, segment_ids, 3)
        Array([0, 2, 4], dtype=int32)
      """
      return _segment_update(
          "segment_min",
          data,
          segment_ids,
          lax.scatter_min,
          num_segments,
          indices_are_sorted,
          unique_indices,
          bucket_size,
          reductions.min,
          mode=mode,
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import sys
  from typing import Callable, Union
  import warnings
  import numpy
  from jax import lax
  from jax._src import config
  from jax._src import core
  from jax._src import dtypes
  from jax._src import util
  from jax._src.lax import lax
  from jax._src.numpy import lax_numpy
  from jax._src.numpy import reductions
  from jax._src.numpy.util import check_arraylike, promote_dtypes
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 8 for calling a global function with example usage: segment_min(data, segment_ids, num_segments, indices_are_sorted, unique_indices, bucket_size, mode) and returns: _segment_update