code: def init_bottleneck(
      params: Dict[str, Any], restored_bottleneck: jnp.ndarray
  ):
      """Initialize bottleneck tokens from a pretrained model."""
      bottleneck = params[_BOTTLENECK_KEY]
      if bottleneck.shape != restored_bottleneck.shape:
          logging.info(
              "Resizing bottleneck tokens from %s to %s.",
              restored_bottleneck.shape,
              bottleneck.shape,
          )
          zoom = (
              1,
              bottleneck.shape[1] / restored_bottleneck.shape[1],
              1,
              1,
          )
          params[_BOTTLENECK_KEY] = scipy.ndimage.zoom(
              restored_bottleneck, zoom, order=1
          )
      else:
          params[_BOTTLENECK_KEY] = restored_bottleneck
  
imports: from typing import Any, Dict, List, Optional, Sequence
  from absl import logging
  import flax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.projects.vivit import model_utils
  from scenic.train_lib import train_utils
  import scipy.ndimage
label_desc: Use image node_id 6 for calling a global function with example usage: init_bottleneck(params, restored_bottleneck) without return types