code: def wrap_quantized_functional(f):
      @functools.wraps(f)
      def wrapper(
          input: Tensor, weight: nn.Parameter, *args, **kwargs
      ) -> Tensor:
          if hasattr(weight, "weight_quantized") and getattr(
              weight, "weight_quantized"
          ):
              (
                  quantized_weight,
                  quant_scale,
                  quant_min,
              ) = weight.deconcat(weight)
              temp_dequantized_weight = weight.dequantizer.dequantize(
                  quantized_weight.view(torch.uint8),
                  quant_scale,
                  quant_min,
              )
              return f(input, temp_dequantized_weight, *args, **kwargs)
          else:
              return f(input, weight, *args, **kwargs)
  
      return wrapper
  
imports: import torch
  import deepspeed
  from torch import Tensor
  from typing import Tuple
  import torch.nn
  from typing import Dict, Callable, Union
  from deepspeed.accelerator import get_accelerator
  import functools
label_desc: Use image node_id 8 for calling a global function with example usage: wrap_quantized_functional(f) and returns: wrapper, f, f