code: def split_into_train_validation(df, val_proportion=0.1):
      n_val = int(val_proportion * len(df))
      df_val = df.sample(n=n_val, random_state=42)
      df_train = df.drop(df_val.index)
      return df_train, df_val
  
imports: import argparse
  import math
  import os
  import pathlib
  from collections import Counter
  import numpy
  import pandas
label_desc: Use image node_id 21 for calling a global function with example usage: split_into_train_validation(df, val_proportion) and returns: df_train,  df_val