code: def get_prepared_filename(filename, split_train_validation=False):
      message = ""
  
      file_extension = pathlib.Path(filename).suffix
      if not split_train_validation:
          new_filename = filename.replace(
              file_extension, "_prepared.jsonl"
          )
          retry = 0
          while os.path.isfile(new_filename):
              message += f"File {new_filename} exists. Trying next available filename increment\n"
              retry += 1
              new_filename = filename.replace(
                  file_extension, f"_prepared{retry}.jsonl"
              )
          return new_filename, message if message else None
      else:
          train_filename = filename.replace(
              file_extension, "_prepared_train.jsonl"
          )
          val_filename = filename.replace(
              file_extension, "_prepared_val.jsonl"
          )
          retry = 0
          while os.path.isfile(train_filename) or os.path.isfile(
              val_filename
          ):
              message += f"File {train_filename} or {val_filename} exists. Trying next available filename increment\n"
              retry += 1
              train_filename = filename.replace(
                  file_extension, f"_prepared_train{retry}.jsonl"
              )
              val_filename = filename.replace(
                  file_extension, f"_prepared_val{retry}.jsonl"
              )
          return [
              train_filename,
              val_filename,
          ], message if message else None
  
imports: import argparse
  import math
  import os
  import pathlib
  from collections import Counter
  import numpy
  import pandas
label_desc: Use image node_id 20 for calling a global function with example usage: get_prepared_filename(filename, split_train_validation) and returns: new_filename,  unknown, list,  unknown