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 return value from a nested dictionary.
  
  If any key provided does not exist, an empty dictionary is returned.
  
  Args:
      dct (dict): the dictionary to set the value of.
      *keys: each additional argument corresponds to a nested key.
  
  Returns:
      value corresponding to ``dct[keys[0]][keys[1]]`` etc.
docstr_tok: ["Safely","return","value","from","a","nested","dictionary",".","If","any","key","provided","does","not","exist",",","an","empty","dictionary","is","returned",".","Args",":","dct","(","dict",")",":","the","dictionary","to","set","the","value","of",".","*","keys",":","each","additional","argument","corresponds","to","a","nested","key",".","Returns",":","value","corresponding","to","``","dct","[","keys","[","0","]","]","[","keys","[","1","]","]","``","etc","."]
code: def safe_get(dct, *keys):
      """Safely return value from a nested dictionary.
  
      If any key provided does not exist, an empty dictionary is returned.
  
      Args:
          dct (dict): the dictionary to set the value of.
          *keys: each additional argument corresponds to a nested key.
  
      Returns:
          value corresponding to ``dct[keys[0]][keys[1]]`` etc.
      """
      for key in keys:
          try:
              dct = dct[key]
          except KeyError:
              return {}
      return dct
  
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 11 for calling the Configuration obj's underlying member method code with example usage: obj.safe_get(dct) and returns: dct, dict