code: def warn_and_drop_long_samples(df, max_total_char_length):
      long_examples = df.apply(
          lambda x: len(x.prompt) + len(x.completion)
          > max_total_char_length,
          axis=1,
      )
      indices_of_long_examples = (
          df.reset_index().index[long_examples].tolist()
      )
      message = None
      if len(indices_of_long_examples) > 0:
          message = f"""TODO: There are {len(indices_of_long_examples)} / {len(df)} 
          samples that have its prompt and completion too long 
          (over {max_total_char_length} chars), which have been dropped."""
          df = df.drop(indices_of_long_examples).reset_index()
          df = df.drop("index", axis=1)
      return df, message
  
imports: import argparse
  import math
  import os
  import pathlib
  from collections import Counter
  import numpy
  import pandas
label_desc: Use image node_id 17 for calling a global function with example usage: warn_and_drop_long_samples(df, max_total_char_length) and returns: df,  message