code: def _register_rule(cls, value=None, values=(), type=None, types=()):
      values = list(values)
      types = list(types)
      if value is not None:
          values.append(value)
      if type is not None:
          types.append(type)
  
      if not values and not types:
          raise ValueError("You must register at least something.")
  
      def decorator(rule_cls):
          for v in values:
              cls.rule_value_classes.setdefault(v, []).append(rule_cls)
          for t in types:
              cls.rule_type_classes.setdefault(t, []).append(rule_cls)
          return rule_cls
  
      return decorator
  
imports: from contextlib import contextmanager
  from parso._compatibility import use_metaclass
label_desc: Use image node_id 12 for calling the Normalizer obj's underlying member method code with example usage: obj._register_rule(cls, value, values, type, types) and returns: decorator, rule_cls