code: def addmm_flop(inputs: List[Any], outputs: List[Any]) -> Number:
      """
      Count flops for fully connected layers.
      """
      # Count flop for nn.Linear
      # inputs is a list of length 3.
      input_shapes = [get_shape(v) for v in inputs[1:3]]
      # input_shapes[0]: [batch size, input feature dimension]
      # input_shapes[1]: [batch size, output feature dimension]
      assert len(input_shapes[0]) == 2, input_shapes[0]
      assert len(input_shapes[1]) == 2, input_shapes[1]
      batch_size, input_dim = input_shapes[0]
      output_dim = input_shapes[1][1]
      flops = batch_size * input_dim * output_dim
      return flops
  
imports: import os
  from collections import defaultdict
  from numbers import Number
  from typing import Any, List
  import torch
  from torch.utils._python_dispatch import TorchDispatchMode
  from torch.utils._pytree import tree_map
  from torchvision.models._api import Weights
label_desc: Use image node_id 4 for calling a global function with example usage: addmm_flop(inputs, outputs) and returns: flops