def complete(self):
comp = []<EOL>for k, v in self.key.items():<EOL><INDENT>if v['<STR_LIT:type>'] == '<STR_LIT:value>':<EOL><INDENT>if '<STR_LIT>' in v:<EOL><INDENT>comp += v['<STR_LIT>'](self.inp_cmd[-<NUM_LIT:1>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>comp.append(k)<EOL><DEDENT><DEDENT>return comp<EOL>
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).