code: def _get_ref_avals(grid, in_avals, in_specs, out_avals, out_specs):
      in_ref_avals = map(state.AbstractRef, in_avals)
      out_ref_avals = map(state.AbstractRef, out_avals)
      if grid is None:
          in_specs = [None] * len(in_avals)
          out_specs = [None] * len(out_avals)
      tiled_in_ref_avals = [
          aval
          if in_spec is no_block_spec
          else _tile_ref(aval, in_spec.block_shape)
          for aval, in_spec in zip(in_ref_avals, in_specs)
      ]
      tiled_out_ref_avals = [
          aval
          if out_spec is no_block_spec
          else _tile_ref(aval, out_spec.block_shape)
          for aval, out_spec in zip(out_ref_avals, out_specs)
      ]
      return (
          in_specs,
          tiled_in_ref_avals,
          out_specs,
          tiled_out_ref_avals,
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import contextlib
  import dataclasses
  import functools
  from typing import Any, Callable
  from collections.abc import Iterator
  from jax._src import api_util
  from jax._src import core
  from jax._src import linear_util
  from jax._src import state
  from jax._src import tree_util
  from jax._src import util
  from jax._src.interpreters import partial_eval
  from jax._src.state import discharge
  import jax.numpy
label_desc: Use image node_id 6 for calling a global function with example usage: _get_ref_avals(grid, in_avals, in_specs, out_avals, out_specs) and returns: in_specs,  tiled_in_ref_avals,  out_specs,  tiled_out_ref_avals