code: def torch_max(
      input: torch.Tensor,
      dim: int = None,
      keepdim: bool = False,
      *,
      out: Optional[torch.Tensor] = None,
  ) -> Tuple[int, int]:
      macs = 0
      assert out is None, "assigning value to out is not supported yet"
      if dim is not None:
          shape = list(input.shape)
          shape.pop(int(dim))
          flops = reduce(operator.mul, shape), macs
          return flops, macs
      else:
          flops = input.numel()
          return flops, macs
  
file_path: ColossalAI/colossalai/fx/profiler/experimental/profiler_function/torch_ops.py
imports: import operator
  from functools import reduce
  from typing import Any, Optional, Tuple
  import torch
  from ..registry import meta_profiler_function
label_desc: Use image node_id 3 for calling a global function with example usage: torch_max(input, dim, keepdim) and returns: flops,  macs, flops,  macs