code: def from_float(cls, mod: _fuse.LinearAct):
      if isinstance(mod.linear, _nnqat.Linear):
          linear = mod.linear
  
      else:
          assert isinstance(mod.linear, _nn.Linear), (
              f"Failed to convert module for QAT. "
              f"Expected module type {_nn.Linear}, "
              f"received type {type(mod.linear)}."
          )
          linear = _nnqat.Linear.from_float(mod.linear)
  
      linear.activation_post_process = None
      return cls(linear, mod.act, mod.qconfig)
  
imports: from collections import OrderedDict
  from typing import Type
  from typing import Union
  import torch
  import torch.ao.nn.intrinsic
  import torch.ao.nn.qat
  import torch.ao.quantization
  import torch.nn
  import torch.nn.intrinsic.qat
  import coremltools.optimize.torch.quantization.modules.fused_modules
label_desc: Use image node_id 5 for calling the LinearAct obj's underlying member method code with example usage: obj.from_float(cls, mod) and returns: cls