def prepareGraphRepresentation(self):

        print("---------------------")
        print("Preparing graph:")
        print("---------------------")

        # Expand or decompose the graph hierarchically
        print " - Expanding and decomposing hierarchy..."
        if isinstance(self.root, TaskGroup):
            self.root = self.root.expand(True)
        else:
            assert isinstance(self.root, Task)
            self.root = self.root.decompose()

        # Create JSON representation
        repr = self._toRepresentation()

        # Precompile dependencies on a taskgroup
        print " - Checking dependencies on taskgroups..."
        for i, node in enumerate(repr["tasks"]):
            if node["type"] == "TaskGroup" and len(node["dependencies"]) != 0:
                # Taskgroup with a dependency
                print "    - Taskgroup %s has %d dependencies: %r" % (
                    node["name"], len(node["dependencies"]),
                    node["dependencies"]
                )
                for dep in node["dependencies"]:
                    srcNodeId = dep[0]
                    srcNode = repr["tasks"][dep[0]]
                    statusList = dep[1]
                    self._addDependencyToChildrenOf(
                        srcNodeId, srcNode, statusList, node, repr)

        return repr
| Prepare a graph representation to be sent to the server or executed
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/puliclient/__init__.py/Graph.prepareGraphRepresentation