class_docstr: This class is primarily meant to be instantiated from ``train_test_split()`` function.
class_docstr_tok: ["This","class","is","primarily","meant","to","be","instantiated","from","``","train_test_split","(",")","``","function","."]
code: def _get_vertical_split_indices(self, ts_length):
      if self.vertical_split_type == SIMPLE:
          if 0 < self.test_size < 1:
              test_size = int(ts_length * self.test_size)
          else:
              test_size = self.test_size
  
          test_start_index = ts_length - test_size
          train_end_index = test_start_index
  
          if test_start_index < 0:
              raise AttributeError(
                  "`test_size` is bigger then timeseries length"
              )
  
      else:
          # model-aware split
  
          # an example on how these are calculated:
          # test_size = 4
          # input_size = 5 (-)
          # horizon = 3 (+)
          # len(data) = 16 (*)
  
          # 0         5         10          15 <- index
          # * * * * * * * * * * * * * * * *
          #                 - - - - - + + +   < test sample 1
          #               - - - - - + + +     < test sample 2
          #             - - - - - + + +       < test sample 3
          #           - - - - - + + +         < test sample 4
          #           ^         ^
          #           |         train_end_index = 10 (note the [:train_end_index] slice stops at 9)
          #           test_start_index = 5
  
          if 0 < self.test_size < 1:
              test_size = int(
                  (ts_length - self.horizon) * self.test_size
              )
          else:
              test_size = self.test_size
  
          train_end_index = ts_length - self.horizon - test_size + 1
          test_start_index = (
              ts_length - self.horizon - self.input_size - test_size + 1
          )
  
          if train_end_index < 0:
              train_end_index = 0
  
          if train_end_index < self.input_size + self.horizon:
              # Note: note that we don't have to check for test_start_index < 0 because train_end_index will always
              # raise exception first.
              raise AttributeError(
                  "Not enough data to create training and test sets"
              )
  
      return train_end_index, test_start_index
  
file_path: darts/darts/utils/model_selection.py
imports: from typing import Optional, Sequence, Tuple, Union
  from darts import TimeSeries
label_desc: Use image node_id 3 for calling the SplitTimeSeriesSequence obj's underlying member method code with example usage: obj._get_vertical_split_indices(ts_length) and returns: train_end_index,  test_start_index