code: 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}`."
          )
  
file_path: lightning-flash/src/flash/core/serve/component.py
imports: import inspect
  from dataclasses import replace
  from functools import wraps
  from typing import Dict, List, Optional, Tuple, Type, Union
  from torch import nn
  from flash.core.serve.core import ParameterContainer, Servable
  from flash.core.serve.decorators import BoundMeta, UnboundMeta
  from flash.core.utilities.imports import _CYTOOLZ_AVAILABLE, _TOPIC_SERVE_AVAILABLE, requires
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_exposed_input_parameters_valid(instance) without return types