code: def init_dist_strategy(
      strategy: Union[str, Dict[str, Any]], **kwargs
  ) -> DistributedStrategy:
      global _current_strategy
      if isinstance(strategy, dict):
          dtype = strategy.pop("type", None)
          obj = get_dist_strategy(dtype)(**strategy)
      else:
          obj = get_dist_strategy(strategy)(**kwargs)
      _current_strategy = obj
      return obj
  
file_path: ludwig/ludwig/distributed/__init__.py
imports: from typing import Any, Dict, Type, Union
  from ludwig.distributed.base import DistributedStrategy, LocalStrategy
label_desc: Use image node_id 6 for calling a global function with example usage: init_dist_strategy(strategy) and returns: obj