def get_random_split_df(
    df, train_fraction,
    random_state):
  """Returns two dfs, randomly split into `train_fraction` and 1-`train_fraction`."""
  train_df = df.sample(frac=train_fraction, random_state=random_state)
  test_df = df[~df.index.isin(train_df.index)]
  return (train_df, test_df)