code: def _split_dataset_from_train(self, dataset, dataset_type):
      if (
          dataset_type in self.config.split_train.keys()
          or dataset_type == "train"
      ):
          start, end = self._calculate_split_for_dataset_type(
              dataset_type
          )
          dataset_length = len(dataset)
          start, end = round(start * dataset_length), round(
              end * dataset_length
          )
          if start > end:
              raise ValueError(
                  f"Train split ratio for {dataset_type} must be positive."
              )
          indices = self._generate_permuted_indexes(dataset_length)[
              start:end
          ]
          dataset = MMFSubset(dataset, indices)
          print(
              f"Dataset type: {dataset_type} length: {len(dataset)} total: {dataset_length}"
          )
      return dataset
  
imports: import collections
  import os
  import typing
  import warnings
  from copy import deepcopy
  import mmf.utils.download
  import torch
  from mmf.datasets.base_dataset_builder import BaseDatasetBuilder
  from mmf.datasets.concat_dataset import MMFConcatDataset
  from mmf.datasets.subset_dataset import MMFSubset
  from mmf.utils.configuration import get_global_config, get_mmf_env, get_zoo_config
  from mmf.utils.general import get_absolute_path
  from omegaconf import open_dict
label_desc: Use image node_id 12 for calling the MMFDatasetBuilder obj's underlying member method code with example usage: obj._split_dataset_from_train(dataset, dataset_type) and returns: dataset