code: def test_serialize(self, session):
      datasets = [
          DatasetModel(
              uri=f"s3://bucket/key/{i+1}",
              extra={"foo": "bar"},
          )
          for i in range(2)
      ]
      session.add_all(datasets)
      session.flush()
      serialized_data = dataset_collection_schema.dump(
          DatasetCollection(datasets=datasets, total_entries=2)
      )
      serialized_data["datasets"][0]["id"] = 1
      serialized_data["datasets"][1]["id"] = 2
      assert serialized_data == {
          "datasets": [
              {
                  "id": 1,
                  "uri": "s3://bucket/key/1",
                  "extra": {"foo": "bar"},
                  "created_at": self.timestamp,
                  "updated_at": self.timestamp,
                  "consuming_dags": [],
                  "producing_tasks": [],
              },
              {
                  "id": 2,
                  "uri": "s3://bucket/key/2",
                  "extra": {"foo": "bar"},
                  "created_at": self.timestamp,
                  "updated_at": self.timestamp,
                  "consuming_dags": [],
                  "producing_tasks": [],
              },
          ],
          "total_entries": 2,
      }
  
imports: from __future__ import annotations
  import pytest
  import time_machine
  from airflow.api_connexion.schemas.dataset_schema import DatasetCollection, DatasetEventCollection, dataset_collection_schema, dataset_event_collection_schema, dataset_event_schema, dataset_schema
  from airflow.datasets import Dataset
  from airflow.models.dataset import DatasetEvent, DatasetModel
  from airflow.operators.empty import EmptyOperator
  from tests.test_utils.db import clear_db_dags, clear_db_datasets
label_desc: Use image node_id 1 for calling the TestDatasetCollectionSchema obj's underlying member method code with example usage: obj.test_serialize(session) without return types