Graph summarization with guarantees