def unbind_params(
    tree: Any,
    predicate: Callable[[Parameter], bool] | None = None,
    freeze: bool = False,
) -> tuple[Any, tuple[Parameter | ParameterValue, ...]]:
  r"""Version of `unbind_variables` that only extracts `Parameter`\ s."""
  return unbind_variables(  # type: ignore
      tree,
      predicate=_type_filtered_predicate(predicate, Parameter),
      freeze=freeze,
  )
Version of `unbind_variables` that only extracts `Parameter`\ s.
penzai/core/variables.py