Repository: pytorch
Issue: `torch.fx.ProxyableClassMeta` does not work if Proxy objects are not included in constructor arguments
Labels: triaged,module: fx

### 🐛 Describe the bug

`ProxyableClassMeta` methods are not traced if proxy object is not included as argument for the class constructor.

```python
class MyClass(metaclass=torch.fx.ProxyableClassMeta):

    def __init__(self, tracer_arg):
        self.tracer_arg = tracer_arg
        self.values = []

    def add_values(self, v):
        self.values.append(v)

def fun(x):
    c = MyClass(x)
    c.add_values(x)
    return c

simple = torch.fx.symbolic_trace(fun)
print(simple.code)
```
produces
```
def forward(self, x):
    my_class = __main___MyClass(x)
    add_values = my_class.add_values(x);  x = None
    return my_class
```
As expected. However if I remove the `tracer_arg` parameter from the constructor
```python
class MyClass(metaclass=torch.fx.ProxyableClassMeta):

    def __init__(self):
        self.values = []

    def add_values(self, v):
        self.values.append(v)

def fun(x):
    c = MyClass()
    c.add_values(x)
    return c

simple = torch.fx.symbolic_trace(fun)
print(simple.code)
```
I get
```
def forward(self, x):
    _my_class_constant_0 = self._MyClass_constant_0
    return _my_class_constant_0
```
however I would expect the `add_values(v)` call to be traced, something like?
```
def forward(self, x):
    _my_class_constant_0 = self._MyClass_constant_0
   add_values = my_class.add_values(x);  x = None
   return _my_class_constant_0
```

### Versions

Collecting environment information...
PyTorch version: 1.10.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (GCC) 11.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07)  [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.13.0-1029-oem-x86_64-with-glibc2.10
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.1
[pip3] numpyfun==0.0.0
[pip3] onnx2pytorch==0.4.1
[pip3] torch==1.10.2
[pip3] torchaudio==0.10.2
[pip3] torchvision==0.11.3
[conda] _tflow_select             2.3.0                       mkl  
[conda] blas                      1.0                         mkl  
[conda] cpuonly                   2.0                           0    pytorch
[conda] cudatoolkit               10.2.89              hfd86e86_1  
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py38h7f8727e_0  
[conda] mkl_fft                   1.3.1            py38hd3c417c_0  
[conda] mkl_random                1.2.2            py38h51133e4_0  
[conda] numpy                     1.22.1                   pypi_0    pypi
[conda] numpy-base                1.20.3           py38h74d4b33_0  
[conda] numpyfun                  0.0.0                    pypi_0    pypi
[conda] onnx2pytorch              0.4.1                    pypi_0    pypi
[conda] pytorch                   1.10.2              py3.8_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.10.2                 py38_cpu  [cpuonly]  pytorch
[conda] torchvision               0.11.3                 py38_cpu  [cpuonly]  pytorch

cc @ezyang @SherlockNoMad