def METHOD_NAME(self):
    # Undirected case
    g = Graph.Tree(6, 3)
    g.es["weight"] = list(range(5))
    self.assertTrue(
        g.get_adjacency()
        == Matrix(
            [
                [0, 1, 1, 1, 0, 0],
                [1, 0, 0, 0, 1, 1],
                [1, 0, 0, 0, 0, 0],
                [1, 0, 0, 0, 0, 0],
                [0, 1, 0, 0, 0, 0],
                [0, 1, 0, 0, 0, 0],
            ]
        )
    )
    self.assertTrue(
        g.get_adjacency(attribute="weight")
        == Matrix(
            [
                [0, 0, 1, 2, 0, 0],
                [0, 0, 0, 0, 3, 4],
                [1, 0, 0, 0, 0, 0],
                [2, 0, 0, 0, 0, 0],
                [0, 3, 0, 0, 0, 0],
                [0, 4, 0, 0, 0, 0],
            ]
        )
    )
    # Directed case
    g = Graph.Tree(6, 3, "tree_out")
    g.add_edges([(0, 1), (1, 0)])
    self.assertTrue(
        g.get_adjacency()
        == Matrix(
            [
                [0, 2, 1, 1, 0, 0],
                [1, 0, 0, 0, 1, 1],
                [0, 0, 0, 0, 0, 0],
                [0, 0, 0, 0, 0, 0],
                [0, 0, 0, 0, 0, 0],
                [0, 0, 0, 0, 0, 0],
            ]
        )
    )