code: def run_pipeline_test(self, conversation_agent, _):
      # Simple
      outputs = conversation_agent(
          Conversation("Hi there!"), max_new_tokens=5
      )
      self.assertEqual(
          outputs,
          Conversation(
              [
                  {"role": "user", "content": "Hi there!"},
                  {"role": "assistant", "content": ANY(str)},
              ]
          ),
      )
  
      # Single list
      outputs = conversation_agent(
          [Conversation("Hi there!")], max_new_tokens=5
      )
      self.assertEqual(
          outputs,
          Conversation(
              [
                  {"role": "user", "content": "Hi there!"},
                  {"role": "assistant", "content": ANY(str)},
              ]
          ),
      )
  
      # Batch
      conversation_1 = Conversation(
          "Going to the movies tonight - any suggestions?"
      )
      conversation_2 = Conversation(
          "What's the last book you have read?"
      )
      self.assertEqual(len(conversation_1), 1)
      self.assertEqual(len(conversation_2), 1)
  
      outputs = conversation_agent(
          [conversation_1, conversation_2], max_new_tokens=5
      )
      self.assertEqual(outputs, [conversation_1, conversation_2])
      self.assertEqual(
          outputs,
          [
              Conversation(
                  [
                      {
                          "role": "user",
                          "content": "Going to the movies tonight - any suggestions?",
                      },
                      {"role": "assistant", "content": ANY(str)},
                  ],
              ),
              Conversation(
                  [
                      {
                          "role": "user",
                          "content": "What's the last book you have read?",
                      },
                      {"role": "assistant", "content": ANY(str)},
                  ]
              ),
          ],
      )
  
      # One conversation with history
      conversation_2.add_message(
          {"role": "user", "content": "Why do you recommend it?"}
      )
      outputs = conversation_agent(conversation_2, max_new_tokens=5)
      self.assertEqual(outputs, conversation_2)
      self.assertEqual(
          outputs,
          Conversation(
              [
                  {
                      "role": "user",
                      "content": "What's the last book you have read?",
                  },
                  {"role": "assistant", "content": ANY(str)},
                  {
                      "role": "user",
                      "content": "Why do you recommend it?",
                  },
                  {"role": "assistant", "content": ANY(str)},
              ]
          ),
      )
  
file_path: transformers/tests/pipelines/test_pipelines_conversational.py
imports: import gc
  import unittest
  from transformers import MODEL_FOR_CAUSAL_LM_MAPPING, MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, TF_MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer, BlenderbotSmallForConditionalGeneration, BlenderbotSmallTokenizer, Conversation, ConversationalPipeline, TFAutoModelForCausalLM, pipeline
  from transformers.testing_utils import backend_empty_cache, is_pipeline_test, is_torch_available, require_tf, require_torch, slow, torch_device
  from .test_pipelines_common import ANY
label_desc: Use image node_id 3 for calling the ConversationalPipelineTests obj's underlying member method code with example usage: obj.run_pipeline_test(conversation_agent, _) without return types