def list_templates(self, name=None):
configs = self._get_templates()<EOL>rows = []<EOL>if name:<EOL><INDENT>matches = self._load_templates(name)<EOL>bot.debug('<STR_LIT>' %(len(matches), name))<EOL>for match in matches:<EOL><INDENT>print(json.dumps(match, indent=<NUM_LIT:4>, sort_keys=True))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for config in configs['<STR_LIT:data>']:<EOL><INDENT>rows.append([config['<STR_LIT:name>']])<EOL><DEDENT>bot.table(rows)<EOL><DEDENT>
list templates in the builder bundle library. If a name is provided,
       look it up

       Parameters
       ==========
       name: the name of a template to look up