code: def without_state(with_state: TransformedWithState) -> Transformed:
      """Returns init/apply functions that ignore state."""
  
      def init_fn(*args, **kwargs):
          params, state = with_state.init(*args, **kwargs)
          if state:
              raise ValueError(
                  "Stateful networks must use `transform_with_state(f)`"
              )
          return params
  
      def apply_fn(params, *args, **kwargs):
          y, state = with_state.apply(params, {}, *args, **kwargs)
          if state:
              raise ValueError(
                  "Stateful networks must use `transform_with_state(f)`"
              )
          return y
  
      return Transformed(init_fn, apply_fn)
  
imports: import collections
  import functools
  import itertools
  import threading
  import contextlib
  from sonnet.src.functional import utils
  import tensorflow
label_desc: Use image node_id 17 for calling a global function with example usage: without_state(with_state) and returns: Transformed, params, y