Update the `diagrams` tool to ensure that graphs identifiers are unique