def write_subgraph(self, subgraph):
        """ Write a subgraph.

        :arg subgraph:
        """
        self.write_literal("({")
        for i, node in enumerate(subgraph.nodes()):
            if i > 0:
                self.write_literal(", ")
            self.write_node(node)
        self.write_literal("}, {")
        for i, relationship in enumerate(subgraph.relationships()):
            if i > 0:
                self.write_literal(", ")
            self.write_relationship(relationship)
        self.write_literal("})")
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/database/cypher.py/CypherWriter.write_subgraph/original