def get_statistic_by_name(stat_name):
if stat_name == '<STR_LIT>':<EOL><INDENT>return get_statistic_models()<EOL><DEDENT>for stat in get_statistic_models():<EOL><INDENT>if stat.__name__ == stat_name:<EOL><INDENT>return stat<EOL><DEDENT><DEDENT>raise Exception(_("<STR_LIT>") % {'<STR_LIT>': stat_name})<EOL>
Fetches a statistics based on the given class name. Does a look-up
in the gadgets' registered statistics to find the specified one.