code: def is_inplace(func):
      name = func.overloadpacket.__name__
      if re.match("__i.+__", name):
          return True
      if re.match("__.+__", name):
          return False
      return name[-1] == "_"
  
imports: import torch
  from torch import Tensor
  import itertools
  from torch.utils._python_dispatch import TorchDispatchMode
  from torch.utils._pytree import tree_map, tree_flatten, tree_unflatten
  from torch.utils import _pytree
  from functools import partial
  from torch.utils._mode_utils import no_dispatch, all_same_mode
  import torch.autograd.forward_ad
  from typing import Callable
  import re
label_desc: Use image node_id 5 for calling a global function with example usage: is_inplace(func) and returns: unknown, True, False