code: def _annotate_linear(
      self,
      gm: torch.fx.GraphModule,
      quantization_config: QuantizationConfig,
  ) -> None:
      linear_partitions = get_source_partitions(
          gm.graph, [torch.nn.Linear, torch.nn.functional.linear]
      )
      linear_partitions = list(
          itertools.chain.from_iterable(linear_partitions.values())
      )
      for partition in linear_partitions:
          if len(partition.output_nodes) > 1:
              raise ValueError(
                  "Linear partition cannot have more than one output node"
              )
          linear_node = partition.output_nodes[0]
          if (
              linear_node.op != "call_function"
              or linear_node.target
              not in (torch.ops.aten.linear.default,)
          ):
              raise ValueError(
                  f"{linear_node} is not an aten linear operator"
              )
          # skip annotation if it is already annotated
          if _is_annotated([linear_node]):
              continue
          self._annotate_linear_node_helper(
              linear_node, True, quantization_config
          )
  
imports: import copy
  import functools
  import itertools
  import operator
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Sequence, Set, Tuple
  import torch
  import torch.nn.functional
  from torch.ao.quantization.fake_quantize import FakeQuantize, FusedMovingAvgObsFakeQuantize
  from torch.ao.quantization.observer import HistogramObserver, MovingAverageMinMaxObserver, MovingAveragePerChannelMinMaxObserver, PerChannelMinMaxObserver, PlaceholderObserver
  from torch.ao.quantization.pt2e.graph_utils import find_sequential_partitions
  from torch.ao.quantization.qconfig import _ObserverOrFakeQuantizeConstructor
  from torch.ao.quantization.quantizer.quantizer import QuantizationAnnotation, QuantizationSpec, Quantizer, SharedQuantizationSpec
  from torch.ao.quantization.quantizer.xnnpack_quantizer_utils import _is_annotated, get_bias_qspec, get_input_act_qspec, get_output_act_qspec, get_weight_qspec, OperatorConfig, OperatorPatternType, QuantizationConfig
  from torch.fx import Node
  from torch.fx.passes.utils.source_matcher_utils import get_source_partitions, SourcePartition
label_desc: Use image node_id 28 for calling the X86InductorQuantizer obj's underlying member method code with example usage: obj._annotate_linear(gm, quantization_config) without return types