code: def calc_updown(self, orig_weight):
      up = self.up_model.weight.to(
          orig_weight.device, dtype=orig_weight.dtype
      )
      down = self.down_model.weight.to(
          orig_weight.device, dtype=orig_weight.dtype
      )
  
      output_shape = [up.size(0), down.size(1)]
      if self.mid_model is not None:
          # cp-decomposition
          mid = self.mid_model.weight.to(
              orig_weight.device, dtype=orig_weight.dtype
          )
          updown = lyco_helpers.rebuild_cp_decomposition(up, down, mid)
          output_shape += mid.shape[2:]
      else:
          if len(down.shape) == 4:
              output_shape += down.shape[2:]
          updown = lyco_helpers.rebuild_conventional(
              up, down, output_shape, self.network.dyn_dim
          )
  
      return self.finalize_updown(updown, orig_weight, output_shape)
  
file_path: stable-diffusion-webui/extensions-builtin/Lora/network_lora.py
imports: import torch
  import lyco_helpers
  import network
  from modules import devices
label_desc: Use image node_id 3 for calling the NetworkModuleLora obj's underlying member method code with example usage: obj.calc_updown(orig_weight) and returns: self