Add from_graph classmethod to Interface.