code: def get_cls_token_and_video_frames(config):
      """Returns whether there is CLS token and the number of video frames."""
  
      has_cls_token = False
      num_video_frames = None
  
      for ds_name, cfg in config.datasets.items():
          # TODO(vlikhosherstov): Add more datasets.
          if ds_name in [
              "kinetics400",
              "moments_in_time",
              "epic_kitchens",
          ]:
              num_video_frames = cfg.num_frames
  
      for head_type, head_cfg in config.model.heads.items():
          for cfg in head_cfg.values():
              if head_type in [
                  "label",
                  "multilabel",
                  "bow",
              ] and cfg.classifier in ["token", "0"]:
                  has_cls_token = True
  
      return has_cls_token, num_video_frames
  
file_path: scenic/scenic/projects/polyvit/model_utils.py
imports: from typing import Any, Optional
  from absl import logging
  import flax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.common_lib import debug_utils
  import scenic.projects.mbt.model_utils
  import scenic.projects.vivit.model_utils
  import scipy
label_desc: Use image node_id 9 for calling a global function with example usage: get_cls_token_and_video_frames(config) and returns: has_cls_token,  num_video_frames