code: def lora_state_dict(
      model: nn.Module, bias: str = "none"
  ) -> Dict[str, torch.Tensor]:
      my_state_dict = model.state_dict()
      if bias == "none":
          return {
              k: my_state_dict[k] for k in my_state_dict if "lora_" in k
          }
      elif bias == "all":
          return {
              k: my_state_dict[k]
              for k in my_state_dict
              if "lora_" in k or "bias" in k
          }
      elif bias == "lora_only":
          to_return = {}
          for k in my_state_dict:
              if "lora_" in k:
                  to_return[k] = my_state_dict[k]
                  bias_name = k.split("lora_")[0] + "bias"
                  if bias_name in my_state_dict:
                      to_return[bias_name] = my_state_dict[bias_name]
          return to_return
      else:
          raise NotImplementedError
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  import math
  from torch.utils.checkpoint import checkpoint
  from typing import Dict
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: lora_state_dict(model, bias) and returns: unknown, unknown, to_return