code: def from_defn(cls, defn):
          "Return the first Repl subclass that works with this"
          instances = (subcl(defn) for subcl in cls.__subclasses__())
          return next(filter(None, instances)f from_defn(cls, defn):
          "Return the first Repl subclass that works with this"
          instances = (subcl(defn) for subcl in cls.__subclasses__())
          return next(filter(None, instances))
docs: Return the first Repl subclass that works with this