code: def eval_shape(fun, *args, **kwargs):
      """Equivalent to jax.eval_shape with any changed Haiku state discarded."""
      if not base.inside_transform():
          raise ValueError(
              "hk.eval_shape() should not be used outside of hk.transform(). "
              "Use jax.eval_shape() instead."
          )
  
      @functools.wraps(fun)
      def stateless_fun(state, *args, **kwargs):
          with temporary_internal_state(
              state
          ), base.push_jax_trace_level():
              out = fun(*args, **kwargs)
              # Don't return changed state
              return out
  
      out_shape = jax.eval_shape(
          stateless_fun, internal_state(), *args, **kwargs
      )
      return out_shape
  
imports: import collections
  import collections.abc
  from collections.abc import Mapping, MutableMapping
  import functools
  import inspect
  from typing import Any, Callable, Optional, TypeVar
  from haiku._src import base
  import jax
  import jax.numpy
label_desc: Use image node_id 27 for calling a global function with example usage: eval_shape(fun) and returns: out_shape, out