Graph in symbolic of autograd.Function is not GraphContext

Hi
Since torch1.13+ torch._C.Graph has been wrapped in GraphContext in the registered symbolic functions.

We can get the opset or envs from the context, that’s cool.

But when we export a custom autograd.Function, the graph in the symbolic is still torch._C.Graph. _run_script_method simply run the symbolic without GraphContext wrapping.

We can not reuse the tools in torch.onnx since some of then might branched by the opset or envs, which is not available in torch._C.Graph.

https://github.com/pytorch/pytorch/blob/7c98e70d44abc7a1aead68b6ea6c8adc8c554db5/torch/onnx/symbolic_opset9.py#L5335

Is it expected? Or should PyTorch create a GraphContext in _run_script_method?