code: def _swap_pp_rule(eqn, context, settings):
      # Pretty prints `a = swap x v i` as `a, x[i] <- x[i], v`
      # or:
      # Pretty prints `_ = swap x v i` as `x[i] <- v`
      (y,) = eqn.outvars
      x, indexers, val, mask = eqn.params["args_tree"].unflatten(
          eqn.invars
      )
      x_i = sp.pp_ref_indexers(context, x, indexers)
      if isinstance(y, jax_core.DropVar):
          return pp.concat(
              [
                  x_i,
                  pp.text(" <- "),
                  pp.text(jax_core.pp_var(val, context)),
              ]
          )
      y = jax_core.pp_vars(
          [y], context, print_shapes=settings.print_shapes
      )
      result = [
          y,
          pp.text(", "),
          x_i,
          pp.text(" <- "),
          x_i,
          pp.text(", "),
          pp.text(jax_core.pp_var(val, context)),
      ]
      if mask is not None:
          result += [
              pp.text(" "),
              pp.text("mask="),
              pp.text(jax_core.pp_var(mask, context)),
          ]
      return pp.concat(result)
  
imports: from __future__ import annotations
  import enum
  import functools
  from typing import Any
  import jax
  from jax import lax
  from jax import tree_util
  from jax._src import ad_util
  from jax._src import core
  from jax._src import pretty_printer
  from jax._src import state
  from jax._src.util import safe_map, safe_zip
  from jax._src.state import discharge
  from jax._src.state import indexing
  from jax._src.state import primitives
  from jax.interpreters import ad
  from jax.interpreters import mlir
  from jax.interpreters import xla
  import jax.numpy
  from jax._src.pallas import core
label_desc: Use image node_id 20 for calling a global function with example usage: _swap_pp_rule(eqn, context, settings) and returns: pp, pp