def legal_module_name(self, name):
if name in self._legal_mnames:<EOL><INDENT>return self._legal_mnames[name]<EOL><DEDENT>for part in name.split('<STR_LIT:.>'):<EOL><INDENT>try:<EOL><INDENT>exec("<STR_LIT>" % part, {}, {})<EOL><DEDENT>except:  <EOL><INDENT>self._legal_mnames[name] = False<EOL>return False<EOL><DEDENT><DEDENT>self._legal_mnames[name] = True<EOL>return True<EOL>
Legal module names are dotted strings where each part
           is a valid Python identifier.
           (and not a keyword, and support unicode identifiers in
           Python3, ..)