code: def set_params(params: dict, name: Optional[str] = None):
      sess = get_default_session()
      return sess.set_params(params, name)
  
imports: from typing import Optional
  from aim.sdk.legacy.session.session import get_default_session
  from aim.sdk.legacy.deprecation_warning import deprecated
label_desc: Use image node_id 2 for calling a global function with example usage: set_params(params, name) and returns: sess