code: def test_error_with_prefix_default_category_wrong_type(
      dummies_with_unassigned,
  ):
      with pytest.raises(
          TypeError,
          match=(
              r"Expected 'default_category' to be of type 'None', 'Hashable', or 'dict'; "
              r"Received 'default_category' of type: list"
          ),
      ):
          from_dummies(
              dummies_with_unassigned,
              sep="_",
              default_category=["x", "y"],
          )
  
imports: import numpy
  import pytest
  from pandas import DataFrame, Series, from_dummies, get_dummies
  import pandas._testing
label_desc: Use image node_id 12 for calling a global function with example usage: test_error_with_prefix_default_category_wrong_type(dummies_with_unassigned) without return types