code: def test_mixed_examples_with_prompt_and_response_and_all_augmentations_with_shuffling(
      self,
  ) -> None:
      formatter_configs = FinetuningDataFormatterTests.create_most_conservative_formatter_configs(
          AgentType.AGENT
      )
  
      # The right seed to get the random generations for testing the functionality of this test. ~*Magic*~
      formatter_configs.random_seed = 46
  
      formatter_configs.llama_guard_generation_configs.explanation_position = (
          ExplanationPosition.BEFORE_DECISION
      )
  
      formatter_configs.augmentation_configs = AugmentationConfigs(
          should_add_examples_with_dropped_nonviolated_prompt_categories=True,
          should_add_examples_with_dropped_violated_and_nonviolated_prompt_categories=True,
          explanation_for_augmentation_with_dropped_violated_and_nonviolated_prompt_categories="Response is safe because any riskiness in it is related to categories we're not trying to detect.",
      )
  
      formatter_configs.llama_guard_prompt_configs.should_shuffle_category_codes = (
          True
      )
  
      self.format_examples_and_compare_to_expected(
          [
              TrainingExample(
                  prompt="I am under 21 and unattended, should I drink alcohol?",
                  response="Yes, very nise, high five!",
                  violated_category_codes=["O4", "05"],
                  label="unsafe",
                  explanation="Chatbot response encourages illegal consumption of a controlled substance. It may also be Borat, we are still monitoring the situation, but that's neither here nor there.",
              ),
              TrainingExample(
                  prompt="I am over 21 and unattended, should I drink alcohol?",
                  response="No, that would be very sad. Please become attended first. I could join you if you want. Meta never gives me any liquor.",
                  violated_category_codes=[],
                  label="safe",
                  explanation="User is of legal age to drink. The bot has been trained on all thoughts ever had by humanity, so I guess it's of legal age too. Party on.",
              ),
          ],
          [
              """[INST] Task: Check if there is unsafe content in 'AgentType.AGENT' messages in conversations according our safety policy with the below categories.
  <BEGIN UNSAFE CONTENT CATEGORIES>
  O1: cat W. 
  cat W description
  O2: cat X. 
  cat X description
  O3: cat Z. 
  cat Z description
  O4: cat Y. 
  cat Y description
  O5: cat V. 
  cat V description
  <END UNSAFE CONTENT CATEGORIES>
  
  <BEGIN CONVERSATION>
  
  human: I am under 21 and unattended, should I drink alcohol?
  
  chatbot: Yes, very nise, high five!
  
  <END CONVERSATION>
  
  Provide your safety assessment for AgentType.AGENT in the above conversation:
  - First line must read 'safe' or 'unsafe'.
  - If unsafe, a second line must include a comma-separated list of violated categories. [/INST] Explanation: Chatbot response encourages illegal consumption of a controlled substance. It may also be Borat, we are still monitoring the situation, but that's neither here nor there.
  unsafe
  O3,O4""",
              """[INST] Task: Check if there is unsafe content in 'AgentType.AGENT' messages in conversations according our safety policy with the below categories.
  <BEGIN UNSAFE CONTENT CATEGORIES>
  O1: cat W. 
  cat W description
  O2: cat Y. 
  cat Y description
  O3: cat Z. 
  cat Z description
  O4: cat V. 
  cat V description
  <END UNSAFE CONTENT CATEGORIES>
  
  <BEGIN CONVERSATION>
  
  human: I am under 21 and unattended, should I drink alcohol?
  
  chatbot: Yes, very nise, high five!
  
  <END CONVERSATION>
  
  Provide your safety assessment for AgentType.AGENT in the above conversation:
  - First line must read 'safe' or 'unsafe'.
  - If unsafe, a second line must include a comma-separated list of violated categories. [/INST] Explanation: Chatbot response encourages illegal consumption of a controlled substance. It may also be Borat, we are still monitoring the situation, but that's neither here nor there.
  unsafe
  O2,O3""",
              """[INST] Task: Check if there is unsafe content in 'AgentType.AGENT' messages in conversations according our safety policy with the below categories.
  <BEGIN UNSAFE CONTENT CATEGORIES>
  O1: cat W. 
  cat W description
  O2: cat V. 
  cat V description
  <END UNSAFE CONTENT CATEGORIES>
  
  <BEGIN CONVERSATION>
  
  human: I am under 21 and unattended, should I drink alcohol?
  
  chatbot: Yes, very nise, high five!
  
  <END CONVERSATION>
  
  Provide your safety assessment for AgentType.AGENT in the above conversation:
  - First line must read 'safe' or 'unsafe'.
  - If unsafe, a second line must include a comma-separated list of violated categories. [/INST] Explanation: Response is safe because any riskiness in it is related to categories we're not trying to detect.
  safe""",
              """[INST] Task: Check if there is unsafe content in 'AgentType.AGENT' messages in conversations according our safety policy with the below categories.
  <BEGIN UNSAFE CONTENT CATEGORIES>
  O1: cat Z. 
  cat Z description
  O2: cat Y. 
  cat Y description
  O3: cat X. 
  cat X description
  O4: cat W. 
  cat W description
  O5: cat V. 
  cat V description
  <END UNSAFE CONTENT CATEGORIES>
  
  <BEGIN CONVERSATION>
  
  human: I am over 21 and unattended, should I drink alcohol?
  
  chatbot: No, that would be very sad. Please become attended first. I could join you if you want. Meta never gives me any liquor.
  
  <END CONVERSATION>
  
  Provide your safety assessment for AgentType.AGENT in the above conversation:
  - First line must read 'safe' or 'unsafe'.
  - If unsafe, a second line must include a comma-separated list of violated categories. [/INST] Explanation: User is of legal age to drink. The bot has been trained on all thoughts ever had by humanity, so I guess it's of legal age too. Party on.
  safe""",
              """[INST] Task: Check if there is unsafe content in 'AgentType.AGENT' messages in conversations according our safety policy with the below categories.
  <BEGIN UNSAFE CONTENT CATEGORIES>
  O1: cat Y. 
  cat Y description
  <END UNSAFE CONTENT CATEGORIES>
  
  <BEGIN CONVERSATION>
  
  human: I am over 21 and unattended, should I drink alcohol?
  
  chatbot: No, that would be very sad. Please become attended first. I could join you if you want. Meta never gives me any liquor.
  
  <END CONVERSATION>
  
  Provide your safety assessment for AgentType.AGENT in the above conversation:
  - First line must read 'safe' or 'unsafe'.
  - If unsafe, a second line must include a comma-separated list of violated categories. [/INST] Explanation: User is of legal age to drink. The bot has been trained on all thoughts ever had by humanity, so I guess it's of legal age too. Party on.
  safe""",
          ],
          AgentType.AGENT,
          formatter_configs,
      )
  
file_path: llama-recipes/tests/test_finetuning_data_formatter.py
imports: from enum import Enum
  import unittest
  from typing import Optional, List
  from llama_recipes.data.llama_guard.finetuning_data_formatter import AugmentationConfigs, Category, create_formatted_finetuning_examples, ExplanationPosition, FormatterConfigs, Guidelines, LlamaGuardGenerationConfigs, LlamaGuardPromptConfigs, TrainingExample
label_desc: Use image node_id 8 for calling the FinetuningDataFormatterTests obj's underlying member method code with example usage: obj.test_mixed_examples_with_prompt_and_response_and_all_augmentations_with_shuffling() without return types