def METHOD_NAME(t):
    if isinstance(t, torch.Tensor):
        if torch._is_functional_tensor(t):
            r = torch._from_functional_tensor(t)
            # NB: This assumes that the inner tensor sizes/strides match
            # the outer tensor sizes/strides.  This doesn't necessarily have to
            # be the case, see discussion at
            # https://github.com/pytorch/pytorch/pull/87610/files/401ddeda1d769bedc88a12de332c7357b60e51a4#r1007264456
            assert t.size() == r.size()
            assert t.stride() == r.stride()
        else:
            r = t
        # TODO: suppress guards
        return fake_mode.from_tensor(r)
    return t