code: def _get_view_index(key: str) -> int:
      return int(key[len(_POSITIONAL_EMBEDDING_KEY) :])
  
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 5 for calling a global function with example usage: _get_view_index(key) and returns: int