code: def get_linear_mod_weight(mod: nn.Module) -> torch.Tensor:
      if isinstance(mod, nn.Linear):
          return mod.weight.detach()
      elif isinstance(mod, nni.LinearReLU):
          return mod[0].weight.detach()
      else:
          return mod._weight_bias()[0]
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  import torch.ao.nn.quantized.dynamic
  import torch.ao.nn.quantized
  import torch.ao.nn.intrinsic.qat
  import torch.ao.nn.qat
  import torch.ao.nn.intrinsic
  import torch.ao.nn.intrinsic.quantized
  from torch.fx import GraphModule
  from torch.fx.graph import Node
  from .utils import get_target_type_str, getattr_from_fqn, return_first_non_observer_node
  from .ns_types import NSSingleResultValuesType, NSSingleResultType
  from typing import List, Optional, Dict, Callable
label_desc: Use image node_id 7 for calling a global function with example usage: get_linear_mod_weight(mod) and returns: mod, mod, mod