docstr: Validate the data splits and raise an error if they are invalid.
  
  Raises
  ------
  ValueError
      If the splits are missing a required key, the sum of split  proportions is
      invalid, or the month values are invalid.
code: def _validate_splits(self) -> None:
      """Validate the data splits and raise an error if they are invalid.
  
      Raises
      ------
      ValueError
          If the splits are missing a required key, the sum of split  proportions is
          invalid, or the month values are invalid.
      """
      for key in ["train", "validation", "test"]:
          if key not in self.splits:
              raise ValueError(f"Missing key in passed splits: {key}")
      if self.split_type == "random":
          split_sum = sum(self.splits.values())
          if split_sum > 1:
              raise ValueError(
                  "Invalid split sizes. Make sure the sum of proportions for all the"
                  " datasets is equal to or lower than 1."
              )
          elif split_sum < 1:
              self.logger.warning(
                  f"Using only {split_sum} of the dataset."
              )
      elif self.split_type == "month":
          all_vals = [
              val
              for val_list in self.splits.values()
              for val in val_list
          ]
          if len(all_vals) > len(set(all_vals)):
              raise ValueError(
                  "Month values are repeated in different sets."
              )
          if max(all_vals) > 7 or min(all_vals) < 0:
              raise ValueError(
                  "Values outside the supported month range."
              )
  
file_path: aequitas/src/aequitas/fairflow/datasets/baf.py
imports: from pathlib import Path
  from typing import Any, Optional, Union
  import pandas
  from validators import url
  from ..utils import create_logger
  from .dataset import Dataset
label_desc: Use image node_id 2 for calling the BankAccountFraud obj's underlying member method code with example usage: obj._validate_splits() without return types