def METHOD_NAME(self, data):
    """Tests that a ``TypeError` is raised when trying to create a DatasetDict with non-string
    keys."""
    with pytest.raises(TypeError, match="'DatasetDict' keys must be strings"):
        DatasetDict(data)