def module_completion(line):
words = line.split('<STR_LIT:U+0020>')<EOL>nwords = len(words)<EOL>if nwords == <NUM_LIT:3> and words[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>return ['<STR_LIT>']<EOL><DEDENT>if nwords < <NUM_LIT:3> and (words[<NUM_LIT:0>] in ['<STR_LIT>','<STR_LIT>']) :<EOL><INDENT>if nwords == <NUM_LIT:1>:<EOL><INDENT>return get_root_modules()<EOL><DEDENT>mod = words[<NUM_LIT:1>].split('<STR_LIT:.>')<EOL>if len(mod) < <NUM_LIT:2>:<EOL><INDENT>return get_root_modules()<EOL><DEDENT>completion_list = try_import('<STR_LIT:.>'.join(mod[:-<NUM_LIT:1>]), True)<EOL>return ['<STR_LIT:.>'.join(mod[:-<NUM_LIT:1>] + [el]) for el in completion_list]<EOL><DEDENT>if nwords >= <NUM_LIT:3> and words[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>mod = words[<NUM_LIT:1>]<EOL>return try_import(mod)<EOL><DEDENT>
Returns a list containing the completion possibilities for an import line.

The line looks like this :
'import xml.d'
'from xml.dom import'