def _construct_doc(self, docdict, shapes_vals=None):
tempdict = docdict.copy()<EOL>tempdict['<STR_LIT:name>'] = self.name or '<STR_LIT>'<EOL>tempdict['<STR_LIT>'] = self.shapes or '<STR_LIT>'<EOL>if shapes_vals is None:<EOL><INDENT>shapes_vals = ()<EOL><DEDENT>vals = '<STR_LIT:U+002CU+0020>'.join(str(_) for _ in shapes_vals)<EOL>tempdict['<STR_LIT>'] = vals<EOL>if self.shapes:<EOL><INDENT>tempdict['<STR_LIT>'] = '<STR_LIT>' % (self.shapes, vals)<EOL><DEDENT>else:<EOL><INDENT>tempdict['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if self.shapes is None:<EOL><INDENT>for item in ['<STR_LIT>', '<STR_LIT:default>', '<STR_LIT>']:<EOL><INDENT>tempdict[item] = tempdict[item].replace(<EOL>"<STR_LIT>", "<STR_LIT>")<EOL><DEDENT><DEDENT>for i in range(<NUM_LIT:2>):<EOL><INDENT>if self.shapes is None:<EOL><INDENT>self.__doc__ = self.__doc__.replace("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>self.__doc__ = doccer.docformat(self.__doc__, tempdict)<EOL><DEDENT>self.__doc__ = self.__doc__.replace('<STR_LIT>', '<STR_LIT:(>').replace('<STR_LIT>', '<STR_LIT:)>')<EOL>
Construct the instance docstring with string substitutions.