code: def check_split_ratio(split_ratio):
      """Check that the split ratio argument is not malformed"""
      valid_ratio = 0.0
      if isinstance(split_ratio, float):
          # Only the train set relative ratio is provided
          # Assert in bounds, validation size is zero
          assert (
              0.0 < split_ratio < 1.0
          ), "Split ratio {} not between 0 and 1".format(split_ratio)
  
          test_ratio = 1.0 - split_ratio
          return (split_ratio, test_ratio, valid_ratio)
      elif isinstance(split_ratio, list):
          # A list of relative ratios is provided
          length = len(split_ratio)
          assert (
              length == 2 or length == 3
          ), "Length of split ratio list should be 2 or 3, got {}".format(
              split_ratio
          )
  
          # Normalize if necessary
          ratio_sum = sum(split_ratio)
          if not ratio_sum == 1.0:
              split_ratio = [
                  float(ratio) / ratio_sum for ratio in split_ratio
              ]
  
          if length == 2:
              return tuple(split_ratio + [valid_ratio])
          return tuple(split_ratio)
      else:
          raise ValueError(
              "Split ratio must be float or a list, got {}".format(
                  type(split_ratio)
              )
          )
  
imports: import csv
  import gzip
  import io
  import os
  import shutil
  import tarfile
  import zipfile
  from functools import partial
  import torch.utils.data
  from torchtext.data.utils import RandomShuffler
  from torchtext.utils import download_from_url
  from .example import Example
label_desc: Use image node_id 1 for calling a global function with example usage: check_split_ratio(split_ratio) and returns: split_ratio,  test_ratio,  valid_ratio, tuple, tuple