def find_implementations(interface, recurse, abstract, result):
for item in MetaComponent.implementations:<EOL><INDENT>if (item['<STR_LIT>'] == interface and (abstract or not item['<STR_LIT>'])):<EOL><INDENT>extend_unique(result, [item['<STR_LIT:class>']])<EOL><DEDENT><DEDENT>if recurse:<EOL><INDENT>subinterfaces = interface.__subclasses__()<EOL>if subinterfaces:<EOL><INDENT>for i in subinterfaces:<EOL><INDENT>find_implementations(i, recurse, abstract, result)<EOL><DEDENT><DEDENT><DEDENT>
Find implementations of an interface or of one of its descendants and
    extend result with the classes found.