code: def add(
      m1: torch.Tensor, m2: torch.Tensor, inplace: bool
  ) -> torch.Tensor:
      # The first operation in a checkpoint can't be in-place, but it's
      # nice to have in-place addition during inference. Thus...
      if not inplace:
          m1 = m1 + m2
      else:
          m1 += m2
  
      return m1
  
file_path: transformers/src/transformers/models/esm/openfold_utils/tensor_utils.py
imports: from functools import partial
  from typing import Any, Callable, Dict, List, Type, TypeVar, Union, overload
  import torch
  import torch.nn
  import torch.types
label_desc: Use image node_id 1 for calling a global function with example usage: add(m1, m2, inplace) and returns: m1