def _validate_subclass_init_signature(cls: Type["ModelComponent"]):
    """Raises SyntaxError if the __init__ method is not formatted correctly.

    Expects arguments: ['self', 'models', Optional['config']]

    Parameters
    ----------
    cls
        class to perform the analysis on

    Raises
    ------
    SyntaxError
        If parameters are not specified correctly.

    """
    params = inspect.signature(cls.__init__).parameters
    if len(params) > 3:
        raise SyntaxError(
            "__init__ can only have 1 or 2 parameters. Must conform to "
            "specification: (`'self', 'model', Optional['config']`)"
        )
    for idx, param in enumerate(params.keys()):
        if (idx == 1) and (param != "model"):
            raise SyntaxError(f"__init__ must set 'model' as first param, not `{param}`")
        if (idx == 2) and (param != "config"):
            raise SyntaxError(f"__init__ can only set 'config' as second param, not `{param}`")
Raises SyntaxError if the __init__ method is not formatted correctly.

    Expects arguments: ['self', 'models', Optional['config']]

    Parameters
    ----------
    cls
        class to perform the analysis on

    Raises
    ------
    SyntaxError
        If parameters are not specified correctly.

    
src/flash/core/serve/component.py