<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_graphtool(cls, graph, weight='weight'):
 r"""Import a graph from graph-tool. Edge weights are retrieved as an edge property, under the name specified by the ``weight`` parameter. Signals are retrieved from node properties, and stored in the :attr:`signals` dictionary under the property name. `N`-dimensional signals that were broken during export are joined. Parameters graph : :class:`graph_tool.Graph` A graph-tool graph object. weight : string The edge property that holds the numerical values used as the edge weights. All edge weights are set to 1 if None, or not found. Returns ------- graph : :class:`~pygsp.graphs.Graph` A PyGSP graph object. Notes ----- If the graph has multiple edge connecting the same two nodes, a sum over the edges is taken to merge them. See Also -------- from_networkx : import from NetworkX load : load from a file Examples -------- array([[0. , 0.2, 0. , 0. ], [0.2, 0. , 0.9, 0. ], [0. , 0.9, 0. , 0. ], [0. , 0. , 0. , 0. ]]) {'sig': PropertyArray([ nan, nan, nan, 3.1416])} """

        gt = _import_graphtool()
        import graph_tool.spectral
        from .graph import Graph

        weight = graph.edge_properties.get(weight, None)
        adjacency = gt.spectral.adjacency(graph, weight=weight)
        graph_pg = Graph(adjacency.T)

        for name, signal in graph.vertex_properties.items():
            graph_pg.set_signal(signal.get_array(), name)

        graph_pg._join_signals()
        return graph_pg