class_docstr: Configuration class.
  
  This class is responsible for loading, saving, and storing PennyLane
  and plugin/device configurations.
  
  Args:
      name (str): filename of the configuration file.
          This should be a valid TOML file. You may also pass an absolute
          or a relative file path to the configuration file.
docstr: Safely set the value of a key from a nested dictionary.
  
  If any key provided does not exist, a dictionary containing the
  remaining keys is dynamically created and set to the required value.
  
  Args:
      dct (dict): the dictionary to set the value of.
      value: the value to set. Can be any valid type.
      *keys: each additional argument corresponds to a nested key.
docstr_tok: ["Safely","set","the","value","of","a","key","from","a","nested","dictionary",".","If","any","key","provided","does","not","exist",",","a","dictionary","containing","the","remaining","keys","is","dynamically","created","and","set","to","the","required","value",".","Args",":","dct","(","dict",")",":","the","dictionary","to","set","the","value","of",".","value",":","the","value","to","set",".","Can","be","any","valid","type",".","*","keys",":","each","additional","argument","corresponds","to","a","nested","key","."]
code: def safe_set(dct, value, *keys):
      """Safely set the value of a key from a nested dictionary.
  
      If any key provided does not exist, a dictionary containing the
      remaining keys is dynamically created and set to the required value.
  
      Args:
          dct (dict): the dictionary to set the value of.
          value: the value to set. Can be any valid type.
          *keys: each additional argument corresponds to a nested key.
      """
      for key in keys[:-1]:
          dct = dct.setdefault(key, {})
  
      dct[keys[-1]] = value
  
file_path: pennylane/pennylane/configuration.py
imports: import contextlib
  import os
  import toml
  from appdirs import user_config_dir
label_desc: Use image node_id 10 for calling the Configuration obj's underlying member method code with example usage: obj.safe_set(dct, value) without return types