code: def reset_cache_bijectors(input_module: tf.Module) -> tf.Module:
      """
      Recursively finds tfp.bijectors.Bijector-s inside the components of the tf.Module using `traverse_component`.
      Resets the caches stored inside each tfp.bijectors.Bijector.
  
      :param input_module: tf.Module including keras.Model, keras.layers.Layer and gpflow.Module.
      :returns: same object but with all bijector caches reset
      """
      if Version(tfp.__version__) >= Version("0.11.0"):
          if hasattr(tfp.bijectors.Identity()._cache, "clear"):
              # implementation in `master` branch (checked 29 Sep 2020) provides clear():
  
              def _clear_bijector_cache(
                  bijector: tfp.bijectors.Bijector,
              ) -> None:
                  bijector._cache.clear()
  
          else:  # pragma: no cover
              # previous versions (including the versions 0.11.0 and 0.11.1 released as of 29 Sep 2020) provide reset(), but its implementation is broken
  
              def _clear_bijector_cache(
                  bijector: tfp.bijectors.Bijector,
              ) -> None:
                  # workaround for broken implementation of bijector._cache.reset():
                  cache = bijector._cache
                  cache_type = type(cache.forward)
                  assert type(cache.inverse) == cache_type
                  cache.__init__(
                      cache.forward._func,
                      cache.inverse._func,
                      cache_type,
                  )
  
      else:  # pragma: no cover
          # fallback for backwards-compatibility with tensorflow_probability < 0.11.0
  
          def _clear_bijector_cache(
              bijector: tfp.bijectors.Bijector,
          ) -> None:
              # `_from_x` and `_from_y` are cache dictionaries for forward and inverse transformations
              bijector._from_x.clear()
              bijector._from_y.clear()
  
      target_types = (tfp.bijectors.Bijector,)
      accumulator = ("", None)
  
      def clear_bijector(
          bijector: tfp.bijectors.Bijector, _: Path, state: None
      ) -> None:
          if not isinstance(bijector, tfp.bijectors.Bijector):
              return  # skip submodules that are not bijectors
  
          _clear_bijector_cache(bijector)
  
          if isinstance(bijector, tfp.bijectors.Chain):
              # recursively clear caches of sub-bijectors
              for m in bijector.submodules:
                  if isinstance(m, tfp.bijectors.Bijector):
                      _clear_bijector_cache(m)
  
          return state
  
      traverse_module(
          input_module, accumulator, clear_bijector, target_types
      )
      return input_module
  
imports: import copy
  import re
  from functools import lru_cache
  from typing import Any, Callable, Dict, Mapping, Optional, Pattern, Tuple, Type, TypeVar, Union
  import numpy
  import tensorflow
  import tensorflow_probability
  from packaging.version import Version
  from tabulate import tabulate
  from tensorflow.python.util.object_identity import Reference
  from ..base import AnyNDArray, Parameter
  from ..config import default_summary_fmt
label_desc: Use image node_id 9 for calling a global function with example usage: reset_cache_bijectors(input_module) and returns: input_module, state