docstr: Use it as a class decorator::
  
      normalizer = Normalizer('grammar', 'config')
      @normalizer.register_rule(value='foo')
      class MyRule(Rule):
          error_code = 42
docstr_tok: ["Use","it","as","a","class","decorator",":",":","normalizer","=","Normalizer","(","'grammar","'",",","'config","'",")","@","normalizer.register_rule","(","value='foo","'",")","class","MyRule","(","Rule",")",":","error_code","=","42"]
code: def register_rule(cls, **kwargs):
      """
      Use it as a class decorator::
  
          normalizer = Normalizer('grammar', 'config')
          @normalizer.register_rule(value='foo')
          class MyRule(Rule):
              error_code = 42
      """
      return cls._register_rule(**kwargs)
  
imports: from contextlib import contextmanager
  from parso._compatibility import use_metaclass
label_desc: Use image node_id 11 for calling the Normalizer obj's underlying member method code with example usage: obj.register_rule(cls) and returns: cls