def module_definition_from_mirteFile_dict(man, d):
m = ModuleDefinition()<EOL>if '<STR_LIT>' not in d:<EOL><INDENT>d['<STR_LIT>'] = list()<EOL><DEDENT>if '<STR_LIT>' not in d:<EOL><INDENT>d['<STR_LIT>'] = dict()<EOL><DEDENT>if '<STR_LIT>' in d:<EOL><INDENT>m.implementedBy = d['<STR_LIT>']<EOL><DEDENT>m.inherits = set(d['<STR_LIT>'])<EOL>for p in d['<STR_LIT>']:<EOL><INDENT>if p not in man.modules:<EOL><INDENT>raise ValueError("<STR_LIT>" % p)<EOL><DEDENT>m.deps.update(man.modules[p].deps)<EOL>m.vsettings.update(man.modules[p].vsettings)<EOL>m.inherits.update(man.modules[p].inherits)<EOL>m.run = m.run or man.modules[p].run<EOL><DEDENT>if '<STR_LIT>' in d:<EOL><INDENT>m.run = d['<STR_LIT>']<EOL><DEDENT>if len(m.inherits) == <NUM_LIT:0>:<EOL><INDENT>m.inherits = set(['<STR_LIT>'])<EOL><DEDENT>for k, v in six.iteritems(d['<STR_LIT>']):<EOL><INDENT>if '<STR_LIT:type>' not in v:<EOL><INDENT>if k not in m.vsettings:<EOL><INDENT>raise ValueError("<STR_LIT>" % k)<EOL><DEDENT>if '<STR_LIT:default>' in v:<EOL><INDENT>m.vsettings[k] = copy.copy(m.vsettings[k])<EOL>m.vsettings[k].default = v['<STR_LIT:default>']<EOL><DEDENT>continue<EOL><DEDENT>if v['<STR_LIT:type>'] in man.modules:<EOL><INDENT>m.deps[k] = DepDefinition(v['<STR_LIT:type>'], v.get('<STR_LIT>', False))<EOL><DEDENT>elif v['<STR_LIT:type>'] in man.valueTypes:<EOL><INDENT>m.vsettings[k] = VSettingDefinition(<EOL>v['<STR_LIT:type>'],<EOL>(man.valueTypes[v['<STR_LIT:type>']](v['<STR_LIT:default>'])<EOL>if '<STR_LIT:default>' in v else None)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" % v)<EOL><DEDENT><DEDENT>return m<EOL>
Creates a ModuleDefinition instance from the dictionary <d> from
        a mirte-file for the Manager instance <man>.