code: def register(kind, rowtype, linetype, second_linetype=None):
      keys = [(kind, rowtype, linetype)]
      if second_linetype is not None:
          keys.append((kind, rowtype, second_linetype))
  
      def decorate(cls):
          for k in keys:
              assert k in KEYS
              assert k not in REGISTRY
              REGISTRY[k] = cls
          return cls
  
      return decorate
  
label_desc: Use image node_id 1 for calling a global function with example usage: register(kind, rowtype, linetype, second_linetype) and returns: decorate, cls