code: def filter_same_seed_problem_solution(
      raw_data: list[dict],
  ) -> tuple[list[dict], list[dict]]:
      chosen_data: list[dict] = []
      seeds: set[str] = set()
      problems: set[str] = set()
      solutions: set[str] = set()
      rejected_data: list[dict] = []
      for d in tqdm(
          raw_data, desc="Filtering same seed, problem, and solution"
      ):
          seed = remove_all_whitespaces(d["seed"])
          problem = remove_all_whitespaces(d["problem"])
          solution = remove_all_whitespaces(d["solution"])
          if (
              seed not in seeds
              and problem not in problems
              and solution not in solutions
          ):
              chosen_data.append(d)
              seeds.add(seed)
              problems.add(problem)
              solutions.add(solution)
          else:
              reason = (
                  "duplicate seeds"
                  if seed in seeds
                  else "duplicate problems"
                  if problem in problems
                  else "duplicate solutions"
              )
              rejected_data.append(dict(reason=reason, **d))
      return chosen_data, rejected_data
  
file_path: magicoder/src/magicoder/clean_data.py
imports: import itertools
  import json
  import random
  import warnings
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import cast
  from tqdm.auto import tqdm
  from transformers import HfArgumentParser
  from magicoder.utils import read_jsonl, write_jsonl
label_desc: Use image node_id 1 for calling a global function with example usage: filter_same_seed_problem_solution(raw_data) and returns: chosen_data,  rejected_data