Adding explicit option for adding self edges.
Adding explicit option for adding self edges.

PiperOrigin-RevId: 363872110

deepmind/deepmind-research,deepmind/deepmind-research,deepmind/deepmind-research,deepmind/deepmind-research