def set_legend(self):
leg = self.ax.legend(prop={'<STR_LIT:size>': <NUM_LIT:10>})<EOL>if leg and self.n_datasets == <NUM_LIT:1>:<EOL><INDENT>try:<EOL><INDENT>leg.remove()<EOL><DEDENT>except NotImplementedError:<EOL><INDENT>leg.set_visible(False)<EOL><DEDENT><DEDENT>return leg<EOL>
Create a legend for this product (if applicable)