code: def indexes(dic, keys=None):
      
      keys = [] if keys is None else keys
  
      assert hasattr(dic, 'keys')
      new = dic.copy()
      old_key = None
      for key in keys:
          if not hasattr(new, 'keys'):
              raise KeyError('No indexes after: {}'.format(old_key))
          old_key = key
          new = new[key]
      return new
docs: index dictionary by multiple keys
  
      Parameters
      ----------
      dic : dict
      keys : list
  
      Examples
      --------
  
      >>> d = {1:{"a":"A"},2:{"b":"B"}}
      >>> indexes(d,[1,'a'])
      'A'