def match_keys(inp, p=False):
_keys = []<EOL>ssh_keys = DO.get_ssh_keys()<EOL>for k in inp.split("<STR_LIT:U+002C>"):<EOL><INDENT>done = False<EOL>if k.isdigit():<EOL><INDENT>for _ in [s for s in ssh_keys if s["<STR_LIT:id>"] == int(k)]:<EOL><INDENT>done = True<EOL>_keys.append(_["<STR_LIT>"])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for _ in [s for s in ssh_keys if s["<STR_LIT>"] == k]:<EOL><INDENT>done = True<EOL>_keys.append(_["<STR_LIT>"])<EOL><DEDENT><DEDENT>if p and not done:<EOL><INDENT>print("<STR_LIT>".format(k), file=sys.stderr)<EOL><DEDENT><DEDENT>return _keys<EOL>
Takes a comma-separated string of key ids or fingerprints and returns a list of key ids