docstr: Tests that a ``TypeError` is raised when trying to create a DatasetDict with non-string
  keys.
docstr_tok: ["Tests","that","a","``","TypeError","`","is","raised","when","trying","to","create","a","DatasetDict","with","non-string","keys","."]
code: def test_init_key_type_not_str_exc(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)
  
file_path: pennylane/tests/data/attributes/test_dict.py
imports: import pytest
  from pennylane.data.attributes import DatasetDict
label_desc: Use image node_id 5 for calling the TestDatasetDict obj's underlying member method code with example usage: obj.test_init_key_type_not_str_exc(data) without return types