def test_missing_optional_fields(self):
        """Ensures function works when optional fields are missing."""
        message_dict = {"role": "user", "content": "Hi!"}
        expected_result = ChatMessage(
            role="user", content="Hi!", additional_kwargs={"tool_calls": []}
        )
        result = _from_message_dict(message_dict)
        assert result == expected_result
Ensures function works when optional fields are missing.
llama-index-integrations/llms/llama-index-llms-oci-data-science/tests/test_oci_data_science_utils.py