[fx ir] Handle the case when output consumes get_attr directly (#57844)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/57844
Reviewed By: 842974287
Differential Revision: D28294298
fbshipit-source-id: db337fadca9f10f208324c9da6d95620178a189b