code: def kwarg_dict_to_proto(kwarg_dict):
      def get_proto_value(value):
          proto_value = mii.grpc_related.proto.modelresponse_pb2.Value()
  
          if isinstance(value, dict):
              nested_dict = (
                  mii.grpc_related.proto.modelresponse_pb2.Dictionary()
              )
              for k, v in value.items():
                  nested_dict.values[k].CopyFrom(get_proto_value(v))
              proto_value.mvalue.CopyFrom(nested_dict)
          else:
              setattr(
                  proto_value, dtype_proto_field[type(value)], value
              )
  
          return proto_value
  
      return {k: get_proto_value(v) for k, v in kwarg_dict.items()}
  
imports: import importlib
  import pickle
  import os
  import time
  import deepspeed
  from dataclasses import dataclass
  from typing import List, TYPE_CHECKING
  from datetime import timedelta
  from huggingface_hub import HfApi
  from transformers import AutoConfig
  import mii
  from mii.constants import MII_CACHE_PATH, MII_CACHE_PATH_DEFAULT, REQUIRED_KEYS_PER_TASK, MII_HF_CACHE_EXPIRATION, MII_HF_CACHE_EXPIRATION_DEFAULT
  from mii.logging import logger
  from mii.score.generate import generated_score_path
label_desc: Use image node_id 7 for calling a global function with example usage: kwarg_dict_to_proto(kwarg_dict) and returns: unknown, proto_value