class_docstr: Bind the input arguments to the model signature.
class_docstr_tok: ["Bind","the","input","arguments","to","the","model","signature","."]
docstr: Bind the input arguments to the model signature.
  
  We hope the input kwargs will be mapped to bound.args after binding.
  If not, we will raise an error.
  
  Args:
      model_args: The model args.
      model_kwargs: The model kwargs.
      model: The PyTorch model.
  
  Returns:
      A tuple of the model args and kwargs. args is always empty.
  
  Raises:
      ValueError: If there are keyword-only arguments left after binding args and
          kwargs to model signature.
code: def apply(
      self,
      model_args: Sequence[Any],
      model_kwargs: Mapping[str, Any],
      model: Optional[
          Union[torch.nn.Module, Callable, torch_export.ExportedProgram]
      ] = None,
  ) -> Tuple[Sequence[Any], Mapping[str, Any]]:
      """Bind the input arguments to the model signature.
  
      We hope the input kwargs will be mapped to bound.args after binding.
      If not, we will raise an error.
  
      Args:
          model_args: The model args.
          model_kwargs: The model kwargs.
          model: The PyTorch model.
  
      Returns:
          A tuple of the model args and kwargs. args is always empty.
  
      Raises:
          ValueError: If there are keyword-only arguments left after binding args and
              kwargs to model signature.
      """
      bound = self._model_signature.bind(*model_args, **model_kwargs)
      bound.apply_defaults()
  
      # keyword-only arguments are not handled.
      # bound.kwargs only contains keyword-only arguments after calling
      # bind & apply_defaults, so we raise if it's not empty.
      if bound.kwargs:
          raise ValueError("Keyword-only arguments are not supported.")
      return (), bound.arguments
  
imports: from __future__ import annotations
  import inspect
  from typing import Any, Callable, List, Mapping, Optional, Protocol, runtime_checkable, Sequence, Tuple, Union
  import torch
  import torch.export
  from torch.onnx._internal import _beartype
  from torch.utils import _pytree
label_desc: Use image node_id 2 for calling the BindInputStep obj's underlying member method code with example usage: obj.apply(model_args, model_kwargs, model) and returns: ,  bound