code: def _is_custom_module_lstm(
      node: Node,
      named_modules: Dict[str, torch.nn.Module],
      qconfig: QConfigAny = None,
      # QuantizeHandler, but we cannot include the type here due to circular imports
      qhandler: Optional[Any] = None,
  ) -> bool:
      """
      Return whether this refers to the custom module LSTM flow.
      """
      mod = _get_module(node, named_modules)
      if qconfig is not None and qhandler is not None:
          assert isinstance(qhandler, torch.ao.quantization.fx.quantize_handler.QuantizeHandler)  # type: ignore[attr-defined]
          return (
              isinstance(mod, torch.nn.LSTM)
              and activation_is_statically_quantized(qconfig)
              and qhandler.is_custom_module()
          )
      else:
          return isinstance(mod, torch.ao.nn.quantizable.LSTM)
  
imports: import copy
  import torch
  import torch.nn
  from torch.ao.quantization import QConfigAny, QuantType
  from torch.ao.quantization.backend_config import DTypeWithConstraints
  from torch.ao.quantization.fake_quantize import FakeQuantizeBase, FixedQParamsFakeQuantize
  from torch.ao.quantization.observer import FixedQParamsObserver, ObserverBase
  from torch.ao.quantization.qconfig import float16_static_qconfig, float16_dynamic_qconfig, qconfig_equals
  from torch.ao.quantization.stubs import DeQuantStub
  from torch.ao.quantization.utils import activation_is_statically_quantized
  from torch.ao.quantization.observer import _is_activation_post_process
  from torch.ao.quantization.qconfig_mapping import QConfigMapping
  from torch.fx import GraphModule, map_arg
  from torch.fx.graph import Graph, Node
  from .custom_config import PrepareCustomConfig
  from ._decomposed import quantized_decomposed_lib
  from typing import Callable, Optional, List, Dict, Any, Set, Tuple, Union, Type
  from dataclasses import dataclass
  from collections import namedtuple
  import operator
  import warnings
label_desc: Use image node_id 18 for calling a global function with example usage: _is_custom_module_lstm(node, named_modules, qconfig, qhandler) and returns: unknown, isinstance