@classmethod<EOL><INDENT>def factory(cls, registry):<DEDENT>
<EOL>cls_name = str(cls.__name__)<EOL>MyMetricsHandler = type(cls_name, (cls, object),<EOL>{"<STR_LIT>": registry})<EOL>return MyMetricsHandler<EOL>
Returns a dynamic MetricsHandler class tied
           to the passed registry.