code: def test_warning_when_only_agent():
      class MockRecord(_Validators):
          prediction: Optional[Any] = None
          prediction_agent: Optional[str] = None
          annotation: Optional[Any] = None
          annotation_agent: Optional[str] = None
  
      with pytest.warns(
          UserWarning,
          match="`prediction_agent` will not be logged to the server.",
      ):
          MockRecord(prediction_agent="mock")
      with pytest.warns(
          UserWarning,
          match="`annotation_agent` will not be logged to the server.",
      ):
          MockRecord(annotation_agent="mock")
  
imports: import datetime
  import json
  import uuid
  from typing import Any, Optional
  import numpy
  import pandas
  import pytest
  from argilla.client.models import Text2TextRecord, TextClassificationRecord, TokenClassificationRecord, _Validators
  from pydantic import ValidationError
label_desc: Use image node_id 12 for calling a global function with example usage: test_warning_when_only_agent() without return types