code: def test_from_assistant_with_valid_content():
      content = "Hello, how can I assist you?"
      message = ChatMessage.from_assistant(content)
      assert message.content == content
      assert message.role == ChatRole.ASSISTANT
  
file_path: haystack/test/dataclasses/test_chat_message.py
imports: import pytest
  from transformers import AutoTokenizer
  from haystack.dataclasses import ChatMessage, ChatRole
label_desc: Use image node_id 1 for calling a global function with example usage: test_from_assistant_with_valid_content() without return types