def __flashserve_init__(self, models, *, config=None):
            """Do a bunch of setup.

            instance's __flashserve_init__ calls subclass __init__ in turn.

            """
            _validate_model_args(models)
            _validate_config_args(config)

            try:
                self.__init__(models, config=config)
            except TypeError:
                self.__init__(models)

            bound_fn = getattr(self, self._flashserve_meta_.exposed.__name__)
            self.__call__ = bound_fn
            self._flashserve_meta_ = BoundMeta(
                exposed=bound_fn,
                inputs=self._flashserve_meta_.inputs,
                outputs=self._flashserve_meta_.outputs,
                models=models,
            )

            return self
Do a bunch of setup.

            instance's __flashserve_init__ calls subclass __init__ in turn.

            
src/flash/core/serve/component.py