def split_questions(input_filepath: str, output_dir: str, questions_per_file: int):
    """
    Splits the input JSON file into multiple smaller JSON files, each containing a specified number of questions.

    Parameters:
    - input_filepath (str): Path to the original JSON file containing all questions.
    - output_dir (str): Directory to save the split JSON files.
    - questions_per_file (int): Number of questions per split file.
    """
    with open(input_filepath, 'r') as f:
        questions = json.load(f)

    # Create output directory if it does not exist
    os.makedirs(output_dir, exist_ok=True)

    # Split questions into chunks and save each chunk as a separate file
    for i in range(0, len(questions), questions_per_file):
        chunk = questions[i:i + questions_per_file]
        output_filepath = os.path.join(output_dir, f"questions_part_{i // questions_per_file + 1}.json")
        with open(output_filepath, 'w') as f:
            json.dump(chunk, f, indent=4)

        print(f"Saved {len(chunk)} questions to {output_filepath}")

    Splits the input JSON file into multiple smaller JSON files, each containing a specified number of questions.

    Parameters:
    - input_filepath (str): Path to the original JSON file containing all questions.
    - output_dir (str): Directory to save the split JSON files.
    - questions_per_file (int): Number of questions per split file.
    
data/omegaPRM_v2/process_json.py