code: def test_softdtw_barycenter():
      n, sz, d = 15, 10, 3
      rng = np.random.RandomState(0)
      time_series = rng.randn(n, sz, d)
  
      # Equal length, 0 iterations -> Euclidean
      euc_bar = tslearn.barycenters.euclidean_barycenter(time_series)
      sdtw_bar = tslearn.barycenters.softdtw_barycenter(
          time_series, max_iter=0
      )
      np.testing.assert_allclose(euc_bar, sdtw_bar)
  
      # Equal length, >0 iterations
      sdtw_bar = tslearn.barycenters.softdtw_barycenter(
          time_series, max_iter=5
      )
      ref = np.array(
          [
              [0.28049395, -0.01190817, -0.06228361],
              [-0.67097059, -0.10737132, -0.33867808],
              [0.29380813, 0.0474172, 0.32718516],
              [0.14438242, -0.56877605, -0.14563386],
              [0.15620728, -0.04473494, -0.63912905],
              [0.35989018, 0.42118863, -0.2127066],
              [0.16831249, 0.65420655, -0.53587191],
              [-0.20737107, 0.15301328, -0.74052802],
              [0.53149515, -0.24839857, -0.03430969],
              [-0.17690603, 0.07217633, 0.58071408],
          ]
      )
      np.testing.assert_allclose(sdtw_bar, ref, atol=1e-6)
  
imports: import numpy
  import tslearn.barycenters
label_desc: Use image node_id 4 for calling a global function with example usage: test_softdtw_barycenter() without return types