def _getStreamDef(self, modelDescription):
<EOL>aggregationPeriod = {<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>': <NUM_LIT:0>,<EOL>}<EOL>aggFunctionsDict = {}<EOL>if '<STR_LIT>' in modelDescription['<STR_LIT>']:<EOL><INDENT>for key in list(aggregationPeriod.keys()):<EOL><INDENT>if key in modelDescription['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>aggregationPeriod[key] = modelDescription['<STR_LIT>']['<STR_LIT>'][key]<EOL><DEDENT><DEDENT>if '<STR_LIT>' in modelDescription['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>for (fieldName, func) in modelDescription['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>aggFunctionsDict[fieldName] = str(func)<EOL><DEDENT><DEDENT><DEDENT>hasAggregation = False<EOL>for v in list(aggregationPeriod.values()):<EOL><INDENT>if v != <NUM_LIT:0>:<EOL><INDENT>hasAggregation = True<EOL>break<EOL><DEDENT><DEDENT>aggFunctionList = list(aggFunctionsDict.items())<EOL>aggregationInfo = dict(aggregationPeriod)<EOL>aggregationInfo['<STR_LIT>'] = aggFunctionList<EOL>streamDef = copy.deepcopy(modelDescription['<STR_LIT>'])<EOL>streamDef['<STR_LIT>'] = copy.deepcopy(aggregationInfo)<EOL>return streamDef<EOL>
Generate stream definition based on