In-place function could achieve it, but many operators has no in-place method, such as followings. How should I do pass by reference for such cases?
def foo(a, b):
   a = torch.max(a, b)

def foo2(a, b, c):
   a = torch.where(c, a, b)