code: def complete(self):
          
  
          comp = []
          for k, v in self.key.items():
  
              # if we have reached a value, try to fetch valid completions
              if v['type'] == 'value':
                  if 'complete' in v:
                      comp += v['complete'](self.inp_cmd[-1])
  
              # otherwise, k is our valid completion
              else:
                  comp.append(k)
  
          return comp
docs: Return list of valid completions
  
              Returns a list of valid completions on the current level in the
              tree. If an element of type 'value' is found, its complete callback
              function is called (if set).