code: def _get_linear_patterns(input_size: List[int]):
      in_channels = input_size[-1]
      out_channels = 8  # hard coding but this should not matter
      weight = torch.ones((out_channels, in_channels))
      bias = torch.ones((out_channels,))
      act = torch.ones(input_size)
  
      def linear_op(act, weight, bias=None):
          return F.linear(act, weight, bias)
  
      pattern_w_bias = _get_dynamo_graph(linear_op, (act, weight, bias))
      pattern_wo_bias = _get_dynamo_graph(linear_op, (act, weight))
      return [pattern_w_bias, pattern_wo_bias]
  
imports: from __future__ import annotations
  import copy
  import functools
  from typing import Any, Callable, Dict, List, Optional, Set
  import torch
  import torch._dynamo
  import torch.nn.functional
  from torch.ao.quantization.fake_quantize import FakeQuantize, FusedMovingAvgObsFakeQuantize
  from torch.ao.quantization.observer import HistogramObserver, MinMaxObserver, MovingAverageMinMaxObserver, MovingAveragePerChannelMinMaxObserver, PerChannelMinMaxObserver, PlaceholderObserver
  from torch.ao.quantization.qconfig import _ObserverOrFakeQuantizeConstructor
  from torch.ao.quantization.quantizer import QuantizationSpec, Quantizer
  from torch.ao.quantization.quantizer.xnnpack_quantizer_utils import _convert_scalars_to_attrs, OP_TO_ANNOTATOR, OperatorConfig, OperatorPatternType, propagate_annotation, QuantizationConfig
  from torch.fx import Node
label_desc: Use image node_id 2 for calling a global function with example usage: _get_linear_patterns(input_size) and returns: list, F