code: def test_metadata_limit():
      long_value = "a" * (settings.metadata_field_length + 1)
      short_value = "a" * (settings.metadata_field_length - 1)
  
      with pytest.warns(expected_warning=UserWarning):
          BaseRecordInDB(metadata=dict(a=long_value))
  
      with warnings.catch_warnings():
          warnings.simplefilter("error")
          BaseRecordInDB(metadata=dict(a=short_value))
  
file_path: argilla/tests/unit/server/daos/models/test_records.py
imports: import warnings
  import pytest
  from argilla.server.daos.models.records import BaseRecordInDB
  from argilla.server.settings import settings
label_desc: Use image node_id 2 for calling a global function with example usage: test_metadata_limit() without return types