class_docstr: Provides a dict-like collection for Dataset attribute types. Keys must
  be strings.
class_docstr_tok: ["Provides","a","dict-like","collection","for","Dataset","attribute","types",".","Keys","must","be","strings","."]
docstr: Checks that __key is a string, and raises a ``TypeError`` if it isn't.
docstr_tok: ["Checks","that","__key","is","a","string",",","and","raises","a","``","TypeError","``","if","it","is","n't","."]
code: def _check_key(self, __key: str) -> None:
      """Checks that __key is a string, and raises a ``TypeError`` if it isn't."""
      if not isinstance(__key, str):
          raise TypeError(
              f"'{type(self).__name__}' keys must be strings."
          )
  
imports: import typing
  from collections.abc import Mapping
  from typing import Dict, Generic, Union
  from pennylane.data.base.attribute import DatasetAttribute
  from pennylane.data.base.hdf5 import HDF5Any, HDF5Group
  from pennylane.data.base.mapper import MapperMixin
  from pennylane.data.base.typing_util import T
label_desc: Use image node_id 15 for calling the DatasetDict obj's underlying member method code with example usage: obj._check_key(__key) without return types