code: def _elementwise_flops_compute(input, other):
      if not torch.is_tensor(input):
          if torch.is_tensor(other):
              return _prod(other.shape), 0
          else:
              return 1, 0
      elif not torch.is_tensor(other):
          return _prod(input.shape), 0
      else:
          dim_input = len(input.shape)
          dim_other = len(other.shape)
          max_dim = max(dim_input, dim_other)
  
          final_shape = []
          for i in range(max_dim):
              in_i = input.shape[i] if i < dim_input else 1
              ot_i = other.shape[i] if i < dim_other else 1
              if in_i > ot_i:
                  final_shape.append(in_i)
              else:
                  final_shape.append(ot_i)
          flops = _prod(final_shape)
          return flops, 0
  
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 27 for calling a global function with example usage: _elementwise_flops_compute(input, other) and returns: _prod,  int, int,  int, _prod,  int, flops,  int