code: def get_number_of_non_param_args(
      node: Node,
      gm: GraphModule,
  ) -> int:
      """
      Assumes that all non-param args occur first. Returns the number of
      non-param args expected for a node.  For example, for
  
        F.linear(x, weight, bias)
  
      Returns 1, because x is a non-param arg and weight and bias are params.
      For
  
        lstm_mod(x, hid)
  
      Returns 2, because both x and hid are non-param args.
      """
      if node.op == "call_module":
          node_obj = getattr_from_fqn(gm, node.target)  # type: ignore[arg-type]
          if isinstance(node_obj, nn.LSTM):
              return 2
  
      # default is 1
      return 1
  
imports: import enum
  import operator
  import torch
  import torch.nn
  import torch.ao.nn.intrinsic.quantized
  import torch.ao.nn.quantized
  from typing import Tuple, Callable, Dict, Set, List, Optional, Union
  from torch.fx import GraphModule
  from torch.fx.graph import Node
  from torch.ao.quantization import ObserverBase, FakeQuantizeBase
  from torch.ao.quantization.utils import getattr_from_fqn
  from torch.ao.quantization.observer import _is_activation_post_process
  from .ns_types import NSNodeTargetType, NSResultsType
label_desc: Use image node_id 4 for calling a global function with example usage: get_number_of_non_param_args(node, gm) and returns: int, int