code: def test_metadata_flatten():
      raw_data = {"a": 1, "b": "value"}
  
      record = BaseRecordInDB(metadata={"a": {"json": raw_data}})
      assert record.metadata == {"a.json.a": 1, "a.json.b": "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 1 for calling a global function with example usage: test_metadata_flatten() without return types