code: def init_conv1(from_conv1: Dict[str, Any], to_conv1: Dict[str, Any]):
      """Initialize the first 3D conv parameters.
  
      Initializes the first 3D conv layer from an image model.
  
      Args:
        from_conv1: The 2D conv weights from a pretrained model.
          from_conv1['kernel'] has a shape of (h, w, in_channels, out_channels).
        to_conv1: The linear projection weights from the current model.
          to_conv1['kernel'] has a shape of (h*w*in_channels, out_channels).
      """
      input_kernel = to_conv1["kernel"]
      restored_kernel = from_conv1["kernel"]
      if input_kernel.shape[0] != np.prod(restored_kernel.shape[:-1]):
          raise ValueError(
              "conv1 kernel shapes mismatch during initialization. from_conv1: %s and"
              "to_conv1: %s"
              % (restored_kernel.shape, input_kernel.shape)
          )
      to_conv1["kernel"] = jnp.reshape(
          restored_kernel, input_kernel.shape
      )
  
imports: from typing import Any, Dict, List, Mapping, Optional, Sequence, Union
  from absl import logging
  import flax
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.projects.vivit import model_utils
  from scenic.train_lib import train_utils
label_desc: Use image node_id 12 for calling a global function with example usage: init_conv1(from_conv1, to_conv1) without return types