code: def register(cls, predicate, factory, prepend=False):
          
          if prepend:
              cls._registered.insert(0, (predicate, factory))
          else:
              cls._registered.append((predicate, factory))
docs: Adds another type X of typecheck annotations to the framework.
          predicate(annot) indicates whether annot has annotation type X;
          factory(annot) creates the appropriate typechecker instance.
          The checker type is normally added after the existing ones,
          but 'prepend' makes it come first.