def _prep_example(
        self,
        example: dict,
        example_idx: int,
        num_fewshot: int,
        prompt_string: str,
        fewshot_rng: random.Random,
    ) -> dict[str, Any]:
        """Prepares a single example from a HF Dataset into tokenized format.

        with prompt and fewshot examples.

        Each task consists of multiple contexts and a single, correct continuation. Will prepend fewshot examples and
        prompt if present.

        Args:
            example (Dict): A dictionary from the hf dataset
            example_idx (int): The index of example
            num_fewshot (int): Number of examples context/continuation pairs to prepend to the test pair
            prompt_string (str): The prompt to prepend to all inputs
            fewshot_rng (random.Random): Random number generator to use for fewshot sampling

        Returns:
            Dict: Contains a dictionary with the tokenized data
        """
        prompt_and_fewshot = self._generate_few_shot_prompt(
            num_fewshot,
            example_idx,
            prompt_string,
            fewshot_rng,
        )
        ctxt = self._construct_multiple_contexts(example, prompt_and_fewshot)
        tokenized_example = self.tokenize_example(
            prompt_and_fewshot,
            ctxt,
            example,
        )
        return tokenized_example
Prepares a single example from a HF Dataset into tokenized format.

        with prompt and fewshot examples.

        Each task consists of multiple contexts and a single, correct continuation. Will prepend fewshot examples and
        prompt if present.

        Args:
            example (Dict): A dictionary from the hf dataset
            example_idx (int): The index of example
            num_fewshot (int): Number of examples context/continuation pairs to prepend to the test pair
            prompt_string (str): The prompt to prepend to all inputs
            fewshot_rng (random.Random): Random number generator to use for fewshot sampling

        Returns:
            Dict: Contains a dictionary with the tokenized data
        
llmfoundry/eval/datasets/in_context_learning_evaluation.py