Split a user behavior log into train/test sets to evaluate a model. In the log, a single user can own multiple rows. The same seed must always produce the same split. Complete make_split(records, test_ratio, seed). Split records into train and test by test_ratio. Example user a (2 rows), b·c·d (1 row each), test_ratio=0.5 → records get divided into train and test, and the same seed yields the same result.
This challenge asks you to complete a function that divides a user behavior log into a training set and a test set to evaluate a model. In the log a single user can own multiple rows, the same seed must always produce the same split, and combining the two sets must preserve every original record with nothing duplicated or missing. It takes a split ratio and a seed, and works on an in-memory list of dicts using only the standard library.
To evaluate a model you split data into a part for training and a part for testing, then judge performance by the test score. In a behavior log, one subject can produce many rows. This problem splits the log into train and test sets, preserves every row across the two sets, and stays reproducible from the seed — and verifies those public requirements by checking the numbers.