class_docstr: PolyVit base model.
docstr: Returns class_splits and split_names.
docstr_tok: ["Returns","class_splits","and","split_names","."]
code: def _get_splits(self):
      """Returns class_splits and split_names."""
  
      class_splits = {}
      split_names = {}
  
      for ds_name, cfg in self.config.datasets.items():
          # The first condition is needed for disabling datasets in hyperparameter
          # sweeps.
          if (
              ds_name in self.dataset_meta_data
              and self.dataset_meta_data[ds_name]["task"]
              == Task.MULTIHEADLABEL
          ):
              assert cfg.get(
                  "class_splits"
              ), "class_splits must be specified"
              class_splits[ds_name] = np.cumsum(cfg.class_splits)
              if cfg.get("split_names"):
                  split_names[ds_name] = cfg.split_names
              else:
                  split_names[ds_name] = [
                      str(x + 1)
                      for x in range(len(class_splits[ds_name]))
                  ]
  
      return class_splits, split_names
  
imports: import functools
  from typing import Any, Dict, Optional, Tuple, List
  from absl import logging
  from flax.training import common_utils
  from immutabledict import immutabledict
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import model_utils
  from scenic.model_lib.base_models.classification_model import classification_metrics_function
  from scenic.model_lib.base_models.encoder_decoder_model import encoder_decoder_metrics_function
  from scenic.model_lib.base_models.multilabel_classification_model import multilabel_classification_metrics_function
  from scenic.projects.vivit import model_utils
label_desc: Use image node_id 2 for calling the PolyVitBaseModel obj's underlying member method code with example usage: obj._get_splits() and returns: class_splits,  split_names