docstr: Dispatch to the appropriate method for running a node.
  
  This method inherits ``run_node`` in `Interpreter` but adds the following features:
  
  - ``call_module`` and ``call_function`` are the only two types of nodes that are profiled.
  - ``call_method``, ``placeholder``, and ``output`` are not profiled because they are not
  computationally intensive.
  - ``get_attr`` is a maybe_profiled node. It is profiled because its ``rst`` can be a `nn.Parameter`.
  
  Parameters
  ----------
  node: Node
      The node to run.
  
  Returns
  -------
  rst: Any
      The result of running the node.
docstr_tok: ["Dispatch","to","the","appropriate","method","for","running","a","node",".","This","method","inherits","``","run_node","``","in","`","Interpreter","`","but","adds","the","following","features",":","-","``","call_module","``","and","``","call_function","``","are","the","only","two","types","of","nodes","that","are","profiled",".","-","``","call_method","``",",","``","placeholder","``",",","and","``","output","``","are","not","profiled","because","they","are","not","computationally","intensive",".","-","``","get_attr","``","is","a","maybe_profiled","node",".","It","is","profiled","because","its","``","rst","``","can","be","a","`","nn.Parameter","`",".","Parameters","--","--","--","--","--","node",":","Node","The","node","to","run",".","Returns","--","--","--","-","rst",":","Any","The","result","of","running","the","node","."]
code: def run_node(self, node: Node) -> Any:
      """Dispatch to the appropriate method for running a node.
  
      This method inherits ``run_node`` in `Interpreter` but adds the following features:
  
      - ``call_module`` and ``call_function`` are the only two types of nodes that are profiled.
      - ``call_method``, ``placeholder``, and ``output`` are not profiled because they are not
      computationally intensive.
      - ``get_attr`` is a maybe_profiled node. It is profiled because its ``rst`` can be a `nn.Parameter`.
  
      Parameters
      ----------
      node: Node
          The node to run.
  
      Returns
      -------
      rst: Any
          The result of running the node.
      """
      rst = super().run_node(node)
      if node.op in self._to_profile:
          NInfo(node, flops=rst[1], parameters=rst[2])
          rst = rst[0]
      elif node.op in self._maybe_profile:
          NInfo(node, parameters=rst[2])
          rst = rst[0]
      else:
          NInfo(node)
      return rst
  
imports: from typing import Any, Callable, Dict, List, Tuple, Optional, Union
  from dataclasses import dataclass, field
  import torch
  import torch.fx
  from torch.fx import Interpreter
  from torch.fx.node import Argument, Node
  from .flop_utils import flop_count
label_desc: Use image node_id 2 for calling the GraphCounter obj's underlying member method code with example usage: obj.run_node(node) and returns: rst