def extension_by_source(source, mime_type):
<EOL>extension = source.plugin_name<EOL>if extension:<EOL><INDENT>return extension<EOL><DEDENT>if mime_type:<EOL><INDENT>return mime_type.split("<STR_LIT:/>")[-<NUM_LIT:1>]<EOL><DEDENT>
Return the file extension used by this plugin