code: def test_allow_list_for_imports(self):
      i = Z(10)
      e = serialize(i)
      with pytest.raises(ImportError) as ex:
          deserialize(e)
  
      assert f"{qualname(Z)} was not found in allow list" in str(
          ex.value
      )
  
imports: from __future__ import annotations
  import datetime
  import enum
  from dataclasses import dataclass
  from importlib import import_module
  from typing import ClassVar
  import attr
  import pytest
  from pydantic import BaseModel
  from airflow.datasets import Dataset
  from airflow.serialization.serde import CLASSNAME, DATA, SCHEMA_ID, VERSION, _get_patterns, _match, deserialize, serialize
  from airflow.utils.module_loading import import_string, iter_namespace, qualname
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 10 for calling the TestSerDe obj's underlying member method code with example usage: obj.test_allow_list_for_imports() without return types