code: def test_floyd_2():
      """Test Floyd's algo, with seed"""
      G = basic_graph()
      seeds = np.array([0, 10])
      l = G.floyd(seeds)
  
      for i in range(10):
          plop = np.abs(l[0, i] - 2 * i * np.sin(2 * np.pi / 40))
          assert plop.max() < 1.0e-4
          plop = np.abs(
              l[0, 19 - i] - 2 * (i + 1) * np.sin(2 * np.pi / 40)
          )
          assert plop.max() < 1.0e-4
  
      for i in range(10):
          plop = np.abs(l[1, i] - 2 * (10 - i) * np.sin(2 * np.pi / 40))
          assert plop.max() < 1.0e-4
          plop = np.abs(
              l[1, 19 - i] - 2 * (9 - i) * np.sin(2 * np.pi / 40)
          )
          assert plop.max() < 1.0e-4
  
imports: import numpy
  import numpy.random
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ..graph import WeightedGraph, complete_graph, concatenate_graphs, eps_nn, knn, mst, wgraph_from_3d_grid, wgraph_from_adjacency, wgraph_from_coo_matrix
label_desc: Use image node_id 33 for calling a global function with example usage: test_floyd_2() without return types