def dep2req(name, imported_by):
lst = [item for item in sorted(imported_by) if not item.startswith(name)]<EOL>res = '<STR_LIT>' % name<EOL>imps = '<STR_LIT:U+002CU+0020>'.join(lst)<EOL>if len(imps) < WIDTH - <NUM_LIT>:<EOL><INDENT>return res + imps<EOL><DEDENT>return res + imps[:WIDTH - <NUM_LIT> - <NUM_LIT:3>] + '<STR_LIT>'<EOL>
Convert dependency to requirement.