Run a function inside a new session context
run_session
creates a new session with the given init params, runs your function within that context, and then ends the session after the function returns.
fn
(callable, required): Function to execute within the session.init_params
(dict, optional): Parameters to pass to init/session
(e.g., session_name
, providers
).*args
, **kwargs
: Arguments forwarded to fn
.fn
returns.