code: def make_state_dict(converted_params):
      """Prepares a state dict for the PyTorch model."""
      # Make a state dict with torch tensors.
      state_dict = collections.OrderedDict(
          [
              (k, torch.from_numpy(v.copy()))
              for (k, v) in converted_params.items()
          ]
      )
  
      return state_dict
  
file_path: colossalai/examples/language/openmoe/model/convert_openmoe_ckpt.py
imports: import argparse
  import collections
  import torch
  from flax import traverse_util
  from modeling_openmoe import OpenMoeForCausalLM
  from t5x import checkpoints
  from transformers import LlamaConfig
  from transformers.utils import logging
label_desc: Use image node_id 8 for calling a global function with example usage: make_state_dict(converted_params) and returns: state_dict