code: def batchnorm_flop_jit(
      inputs: List[Any], outputs: List[Any], training: bool = None
  ) -> int:
      if training is None:
          training = inputs[-3]
      assert isinstance(
          training, bool
      ), "Signature of aten::batch_norm has changed!"
      if training:
          return norm_flop_counter(1, 0)(inputs, outputs)  # pyre-ignore
      has_affine = inputs[1].shape is not None
      input_shape = reduce(operator.mul, inputs[0].shape)
      return input_shape * (2 if has_affine else 1)
  
imports: import operator
  from collections import defaultdict
  from contextlib import contextmanager
  from enum import Enum, auto
  from functools import partial, reduce
  from typing import Any, Callable, List, Union
  import torch
  from torch.utils._pytree import tree_map
label_desc: Use image node_id 12 for calling a global function with example usage: batchnorm_flop_jit(inputs, outputs, training) and returns: unknown, norm_flop_counter