code: def inject(
      inp: Union[str, tensor_dict_type], api: DiffusionAPI
  ) -> None:
      d = get_tensors(inp)
      with api.load_context() as m:
          m.load_state_dict(d)
  
imports: import json
  import torch
  from torch import Tensor
  from typing import Dict
  from typing import List
  from typing import Union
  from typing import Optional
  from cftool.misc import shallow_copy_dict
  from cftool.array import tensor_dict_type
  from ..misc.toolkit import get_tensors
  from ..misc.toolkit import download_static
  from ..api.cv.diffusion import DiffusionAPI
label_desc: Use image node_id 9 for calling a global function with example usage: inject(inp, api) without return types