Allow torch.Tensor.real on real-valued tensors (#71718)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71718
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D33770668
Pulled By: anjali411
fbshipit-source-id: bad21ebe72220b9017a0b8efa71eaeab84bd9e9f
(cherry picked from commit aa0a922757277ac7b3ad4d633648a89c385ccc0d)