code: def test_validate_size(self):
      train_size, val_size, test_size = RatioSplit.validate_size(
          0.1, 0.2, 10
      )
      self.assertEqual(train_size, 7)
      self.assertEqual(val_size, 1)
      self.assertEqual(test_size, 2)
  
      train_size, val_size, test_size = RatioSplit.validate_size(
          None, 0.5, 10
      )
      self.assertEqual(train_size, 5)
      self.assertEqual(val_size, 0)
      self.assertEqual(test_size, 5)
  
      train_size, val_size, test_size = RatioSplit.validate_size(
          None, None, 10
      )
      self.assertEqual(train_size, 10)
      self.assertEqual(val_size, 0)
      self.assertEqual(test_size, 0)
  
      train_size, val_size, test_size = RatioSplit.validate_size(
          2, 2, 10
      )
      self.assertEqual(train_size, 6)
      self.assertEqual(val_size, 2)
      self.assertEqual(test_size, 2)
  
      try:
          RatioSplit.validate_size(-1, 0.2, 10)
      except ValueError:
          assert True
  
      try:
          RatioSplit.validate_size(1, -0.2, 10)
      except ValueError:
          assert True
  
      try:
          RatioSplit.validate_size(11, 0.2, 10)
      except ValueError:
          assert True
  
      try:
          RatioSplit.validate_size(0, 11, 10)
      except ValueError:
          assert True
  
      try:
          RatioSplit.validate_size(3, 8, 10)
      except ValueError:
          assert True
  
file_path: cornac/tests/cornac/eval_methods/test_ratio_split.py
imports: import unittest
  import itertools
  import random
  from cornac.eval_methods import RatioSplit
  from cornac.data import Reader
  from cornac.models import MF
  from cornac.metrics import MAE, Recall
label_desc: Use image node_id 2 for calling the TestRatioSplit obj's underlying member method code with example usage: obj.test_validate_size() without return types