class_docstr: Iterates over data for Morphological Tagging.
  A subclass of :class:`~deeppavlov.core.data.data_learning_iterator.DataLearningIterator`.
  
  Args:
      seed: random seed for data shuffling
      shuffle: whether to shuffle data during batching
      validation_split: the fraction of validation data
          (is used only if there is no `valid` subset in `data`)
docstr: Splits the `train` part to `train` and `valid`, if no `valid` part is specified.
  Moves deficient data from `valid` to `train` if both parts are given,
  but `train` subset is too small.
docstr_tok: ["Splits","the","`","train","`","part","to","`","train","`","and","`","valid","`",",","if","no","`","valid","`","part","is","specified",".","Moves","deficient","data","from","`","valid","`","to","`","train","`","if","both","parts","are","given",",","but","`","train","`","subset","is","too","small","."]
code: def split(self, *args, **kwargs) -> None:
      """
      Splits the `train` part to `train` and `valid`, if no `valid` part is specified.
      Moves deficient data from `valid` to `train` if both parts are given,
      but `train` subset is too small.
      """
      if len(self.valid) == 0:
          if self.shuffle:
              self.random.shuffle(self.train)
          L = int(len(self.train) * (1.0 - self.validation_split))
          self.train, self.valid = self.train[:L], self.train[L:]
  
file_path: DeepPavlov/deeppavlov/dataset_iterators/morphotagger_iterator.py
imports: from typing import Tuple, List, Dict, Any, Iterator
  import numpy
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.data_learning_iterator import DataLearningIterator
label_desc: Use image node_id 2 for calling the MorphoTaggerDatasetIterator obj's underlying member method code with example usage: obj.split() without return types