@staticmethod
    def auto(params):

        def subclasses(cls):
            return cls.__subclasses__() + [g for s in cls.__subclasses__() for g in subclasses(s)]

        for cls in subclasses(FormElement):
            if cls.recognizes(params):
                return cls(params)
        raise ValueError("Unrecognzied UI Component: %s" % (params,))
Construct the appropriate FormElement subclass,
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/FormElement.auto