code: def torch_nn_conv3d(
      self: torch.nn.Conv3d, input: torch.Tensor
  ) -> Tuple[int, int]:
      # the output shape is calculated using the formula stated
      # at https://pytorch.org/docs/stable/generated/torch.nn.Conv3d.html
      c_in, d_in, h_in, w_in = input.shape[-4:]
      c_out = self.out_channels
      d_out = math.floor(
          (
              d_in
              + 2 * self.padding[0]
              - self.dilation[0] * (self.kernel_size[0] - 1)
              - 1
          )
          / self.stride[0]
          + 1
      )
      h_out = math.floor(
          (
              h_in
              + 2 * self.padding[1]
              - self.dilation[1] * (self.kernel_size[1] - 1)
              - 1
          )
          / self.stride[1]
          + 1
      )
      w_out = math.floor(
          (
              w_in
              + 2 * self.padding[2]
              - self.dilation[2] * (self.kernel_size[2] - 1)
              - 1
          )
          / self.stride[2]
          + 1
      )
      result_shape = input.shape[:-4] + (
          c_out,
          d_out,
          h_out,
          w_out,
      )
      macs_per_elem = (
          reduce(operator.mul, self.kernel_size) * c_in // self.groups
      )
      num_elem = reduce(operator.mul, result_shape)
      macs = macs_per_elem * num_elem
      flops = 2 * macs
      if self.bias is not None:
          flops += num_elem
      return flops, macs
  
file_path: ColossalAI/colossalai/fx/profiler/experimental/profiler_module/convolution.py
imports: import math
  import operator
  from functools import reduce
  from typing import Tuple
  import torch
  from ..registry import meta_profiler_module
label_desc: Use image node_id 3 for calling a global function with example usage: torch_nn_conv3d(input) and returns: flops,  macs