code: def _check_can_set(self, key, value):
      if not self.__frozen_keys:
          return
  
      # Don't allow unknown keys
      if key not in self:
          raise SettingError(
              f"Unknown setting: {key}. Possible keys are: "
              f"{list(self.keys())}"
          )
  
      # Don't allow setting keys that represent nested settings
      if isinstance(self[key], Munch) and not isinstance(value, Munch):
          # We don't want to overwrite a munch mapping. This is the easiest
          # solution and closest to the original implementation where setting
          # a setting with a dict would likely at some point cause an
          # exception
          raise SettingError(
              f"Can't set this setting ({key}) to a non-munch value "
              f"{value}, it is a nested setting!"
          )
  
file_path: sacred/sacred/settings.py
imports: import platform
  from sacred.utils import SacredError
  import sacred.optional
  from munch import Munch
  from packaging import version
label_desc: Use image node_id 2 for calling the FrozenKeyMunch obj's underlying member method code with example usage: obj._check_can_set(key, value) without return types