def _validate_exposed_input_parameters_valid(instance):
    """Raises RuntimeError if exposed parameters != method argument names."""
    spec = inspect.getfullargspec(instance._flashserve_meta_.exposed)

    exposed_args = spec.args[1:]  # do not include `self` arg
    if spec.varargs:
        exposed_args.extend(spec.varargs)
    if spec.varkw:
        exposed_args.extend(spec.varkw)
    if spec.kwonlyargs:
        exposed_args.extend(spec.kwonlyargs)

    diff = set(exposed_args).symmetric_difference(instance._flashserve_meta_.inputs.keys())
    if len(diff) > 0:
        raise RuntimeError(
            f"Methods decorated by `@expose` must list all method arguments in `inputs` "
            f"parameter passed to `expose`. Expected: exposed method args = `{exposed_args}` "
            f"recieved input keys passed to `expose` = `{instance._flashserve_meta_.inputs.keys()}`. "
            f"Difference = `{diff}`."
        )
Raises RuntimeError if exposed parameters != method argument names.
src/flash/core/serve/component.py