code: def _attention_reference(
      mask: jax.Array,
      q: jax.Array,
      k: jax.Array,
      v: jax.Array,
      segment_ids: SegmentIds | None,
      save_residuals: Literal[True],
      mask_value: float,
      custom_type: str,
      attn_logits_soft_cap: float | None,
  ) -> tuple[jax.Array, tuple[jax.Array]]:
      ...
  
imports: from __future__ import annotations
  import dataclasses
  import enum
  import functools
  from typing import Any, Callable, Literal, NamedTuple, Union, Optional, overload
  import jax
  from jax import ad_checkpoint
  from jax import lax
  from jax import tree_util
  from jax.experimental import pallas
  from jax.experimental.pallas import tpu
  from jax.experimental.pallas.ops.tpu.splash_attention import splash_attention_mask
  from jax.experimental.pallas.ops.tpu.splash_attention import splash_attention_mask_info
  import jax.numpy
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _attention_reference(mask, q, k, v, segment_ids, save_residuals, mask_value, custom_type, attn_logits_soft_cap) without return types