code: def _validate_val_p_and_test_p(val_p: float, test_p: float) -> None:
      validate_and_test_p = val_p + test_p
  
      if val_p >= 1 or val_p < 0:
          raise ValueError("``val_p`` must be in the range [0, 1).")
      if test_p >= 1 or test_p < 0:
          raise ValueError("``test_p`` must be in the range [0, 1).")
      if validate_and_test_p >= 1 or validate_and_test_p <= 0:
          raise ValueError(
              "The sum of ``val_p`` and ``test_p`` must be in the range (0, 1)."
          )
  
file_path: collie/collie/cross_validation.py
imports: from collections import defaultdict
  import functools
  import operator
  from typing import Any, Iterable, Optional, Tuple, Union
  from joblib import delayed, Parallel
  import numpy
  from scipy.sparse import coo_matrix
  from sklearn.model_selection import train_test_split
  from collie.interactions import BaseInteractions, ExplicitInteractions, HDF5Interactions, Interactions
  from collie.utils import get_random_seed
label_desc: Use image node_id 6 for calling a global function with example usage: _validate_val_p_and_test_p(val_p, test_p) without return types