code: def read_in_q_k_v(state_dict, config, model):
      for i in range(len(config.backbone_config.depths)):
          for j in range(config.backbone_config.depths[i]):
              dim = (
                  model.backbone.encoder.layers[i]
                  .blocks[j]
                  .attention.self.all_head_size
              )
              # read in weights + bias of input projection layer (in original implementation, this is a single matrix + bias)
              in_proj_weight = state_dict.pop(
                  f"pretrained.model.layers.{i}.blocks.{j}.attn.qkv.weight"
              )
              # next, add query, keys and values (in that order) to the state dict
              state_dict[
                  f"backbone.encoder.layers.{i}.blocks.{j}.attention.self.query.weight"
              ] = in_proj_weight[:dim, :]
              state_dict[
                  f"backbone.encoder.layers.{i}.blocks.{j}.attention.self.key.weight"
              ] = in_proj_weight[dim : dim * 2, :]
              state_dict[
                  f"backbone.encoder.layers.{i}.blocks.{j}.attention.self.value.weight"
              ] = in_proj_weight[-dim:, :]
  
file_path: transformers/src/transformers/models/dpt/convert_dpt_swinv2_to_hf.py
imports: import argparse
  from pathlib import Path
  import requests
  import torch
  from PIL import Image
  from transformers import DPTConfig, DPTForDepthEstimation, DPTImageProcessor, Swinv2Config
  from transformers.utils import logging
label_desc: Use image node_id 4 for calling a global function with example usage: read_in_q_k_v(state_dict, config, model) without return types