code: def _patch_functionals():
      # FC
      F.linear = wrapFunc(F.linear, _linear_flops_compute)
  
      # convolutions
      F.conv1d = wrapFunc(F.conv1d, _conv_flops_compute)
      F.conv2d = wrapFunc(F.conv2d, _conv_flops_compute)
      F.conv3d = wrapFunc(F.conv3d, _conv_flops_compute)
  
      # conv transposed
      F.conv_transpose1d = wrapFunc(
          F.conv_transpose1d, _conv_trans_flops_compute
      )
      F.conv_transpose2d = wrapFunc(
          F.conv_transpose2d, _conv_trans_flops_compute
      )
      F.conv_transpose3d = wrapFunc(
          F.conv_transpose3d, _conv_trans_flops_compute
      )
  
      # activations
      F.relu = wrapFunc(F.relu, _relu_flops_compute)
      F.prelu = wrapFunc(F.prelu, _prelu_flops_compute)
      F.elu = wrapFunc(F.elu, _elu_flops_compute)
      F.leaky_relu = wrapFunc(F.leaky_relu, _leaky_relu_flops_compute)
      F.relu6 = wrapFunc(F.relu6, _relu6_flops_compute)
      if hasattr(F, "silu"):
          F.silu = wrapFunc(F.silu, _silu_flops_compute)
      F.gelu = wrapFunc(F.gelu, _gelu_flops_compute)
  
      # Normalizations
      F.batch_norm = wrapFunc(F.batch_norm, _batch_norm_flops_compute)
      F.layer_norm = wrapFunc(F.layer_norm, _layer_norm_flops_compute)
      F.instance_norm = wrapFunc(
          F.instance_norm, _instance_norm_flops_compute
      )
      F.group_norm = wrapFunc(F.group_norm, _group_norm_flops_compute)
  
      # poolings
      F.avg_pool1d = wrapFunc(F.avg_pool1d, _pool_flops_compute)
      F.avg_pool2d = wrapFunc(F.avg_pool2d, _pool_flops_compute)
      F.avg_pool3d = wrapFunc(F.avg_pool3d, _pool_flops_compute)
      F.max_pool1d = wrapFunc(F.max_pool1d, _pool_flops_compute)
      F.max_pool2d = wrapFunc(F.max_pool2d, _pool_flops_compute)
      F.max_pool3d = wrapFunc(F.max_pool3d, _pool_flops_compute)
      F.adaptive_avg_pool1d = wrapFunc(
          F.adaptive_avg_pool1d, _pool_flops_compute
      )
      F.adaptive_avg_pool2d = wrapFunc(
          F.adaptive_avg_pool2d, _pool_flops_compute
      )
      F.adaptive_avg_pool3d = wrapFunc(
          F.adaptive_avg_pool3d, _pool_flops_compute
      )
      F.adaptive_max_pool1d = wrapFunc(
          F.adaptive_max_pool1d, _pool_flops_compute
      )
      F.adaptive_max_pool2d = wrapFunc(
          F.adaptive_max_pool2d, _pool_flops_compute
      )
      F.adaptive_max_pool3d = wrapFunc(
          F.adaptive_max_pool3d, _pool_flops_compute
      )
  
      # upsample
      F.upsample = wrapFunc(F.upsample, _upsample_flops_compute)
      F.interpolate = wrapFunc(F.interpolate, _upsample_flops_compute)
  
      # softmax
      F.softmax = wrapFunc(F.softmax, _softmax_flops_compute)
  
      # embedding
      F.embedding = wrapFunc(F.embedding, _embedding_flops_compute)
  
imports: import time
  import torch
  import torch.nn
  import torch.nn.functional
  from functools import partial
  from typing import List, Optional
  from collections import OrderedDict
  import numpy
label_desc: Use image node_id 29 for calling a global function with example usage: _patch_functionals() without return types