code: def init_context(
      computing_session_id: str, federation_session_id: str
  ):
      args = HfArgumentParser(
          LauncherContextArguments
      ).parse_known_args()[0]
      if args.context_type == "local":
          return init_local_context(
              computing_session_id, federation_session_id
          )
      elif args.context_type == "cluster":
          return init_cluster_context(
              computing_session_id, federation_session_id
          )
      else:
          raise ValueError(f"unknown context type: {args.context_type}")
  
file_path: FATE/python/fate/arch/launchers/context_helper.py
imports: import os
  from dataclasses import dataclass, field
  from typing import List
  from .argparser import HfArgumentParser, get_parties
label_desc: Use image node_id 1 for calling a global function with example usage: init_context(computing_session_id, federation_session_id) and returns: init_local_context, init_cluster_context