code: def _get_module_name_filter(module_name: str):
      """Get the module_name_filter function for a given module name, the filter accepts
      a node and checks if the node comes from a module that has certain module name
  
      For example:
          node: linear_op = call_function[...](...)  # comes from a module with name blocks.sub.linear1
  
  
      >> module_name_filter = _get_module_name_filter("blocks.sub")
      >> print(module_name_filter(node))
      True  # the node is from "blocks.sub" based on the fully qualified name "blocks.sub.linear1"
      """
  
      def module_name_filter(n: Node) -> bool:
          # example: {
          #    'L__self___sub': ("L['self'].sub", <class '....Sub'>),
          #    'L__self___sub_linear': ("L['self'].sub.linear", <class 'torch.nn.modules.linear.Linear'>)
          # }
          # get_attr nodes doesn't have nn_module_stack?
          nn_module_stack = n.meta.get("nn_module_stack", {})
          names = [
              n[len("L__self___") :].replace("_", ".")
              for n in nn_module_stack.keys()
          ]
          return module_name in names
  
      return module_name_filter
  
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 7 for calling a global function with example usage: _get_module_name_filter(module_name) and returns: module_name_filter, unknown