code: def concat_conversations(
      concatinate_me,
      destination,
      source_metadata=None,
      destination_metadata=None,
  ):
      if source_metadata:
          copyfile(source_metadata, destination_metadata)
      seen_lines = set()
      file_stats = {}
      with open(destination, "w+") as destfile:
          for source in concatinate_me:
              print(source)
              new_in_file = 0
              dup_in_file = 0
              with open(source) as infile:
                  for line in infile:
                      convo_raw = json.loads(line)["dialog"]
                      convo_formatted = [
                          x["text"]
                          for round in convo_raw
                          for x in round
                      ]
                      convo = json.dumps(convo_formatted)
                      if convo not in seen_lines:
                          destfile.write(line)
                          seen_lines.add(convo)
                          new_in_file += 1
                      else:
                          dup_in_file += 1
              file_stats[source] = {
                  "new": new_in_file,
                  "dup": dup_in_file,
              }
      print("Concat + filter dupe stats")
      print(json.dumps(file_stats, indent=4))
      with open(
          destination.replace(".jsonl", "_concat_stats.json"), "w+"
      ) as f:
          json.dump(file_stats, f, indent=4)
  
imports: from parlai.core.script import ParlaiScript, register_script
  from parlai.scripts.train_model import TrainModel
  from parlai.scripts.distributed_train import DistributedTrain, setup_args
  from parlai.scripts.eval_model import EvalModel
  from parlai.scripts.distributed_eval import DistributedEval
  from parlai.scripts.tod_world_script import TodWorldScript
  from parlai.scripts.distributed_tod_world_script import DistributedTodWorldScript
  from projects.tod_simulator.scripts.get_passing_only import GetPassingOnlyScript
  from projects.tod_simulator.scripts.get_al_samples_for_gsgd import GetAlSamplesForGsgdScript, setup_args
  import copy
  import os
  from shutil import copyfile
  import json
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: concat_conversations(concatinate_me, destination, source_metadata, destination_metadata) without return types