code: def test_simple():
      a = array(
          [
              [
                  -0.39 - 0.71j,
                  5.14 - 0.64j,
                  -7.86 - 2.96j,
                  3.80 + 0.92j,
              ],
              [5.14 - 0.64j, 8.86 + 1.81j, -3.52 + 0.58j, 5.32 - 1.59j],
              [
                  -7.86 - 2.96j,
                  -3.52 + 0.58j,
                  -2.83 - 0.03j,
                  -1.54 - 2.86j,
              ],
              [
                  3.80 + 0.92j,
                  5.32 - 1.59j,
                  -1.54 - 2.86j,
                  -0.56 + 0.12j,
              ],
          ]
      )
      b = array(
          [
              [5.0, 10, 1, 18],
              [10.0, 2, 11, 1],
              [1.0, 11, 19, 9],
              [18.0, 1, 9, 0],
          ]
      )
      c = array(
          [
              [52.0, 97, 112, 107, 50],
              [97.0, 114, 89, 98, 13],
              [112.0, 89, 64, 33, 6],
              [107.0, 98, 33, 60, 73],
              [50.0, 13, 6, 73, 77],
          ]
      )
  
      d = array(
          [
              [2.0, 2, -4, 0, 4],
              [2.0, -2, -2, 10, -8],
              [-4.0, -2, 6, -8, -4],
              [0.0, 10, -8, 6, -6],
              [4.0, -8, -4, -6, 10],
          ]
      )
      e = array(
          [
              [-1.36 + 0.00j, 0 + 0j, 0 + 0j, 0 + 0j],
              [1.58 - 0.90j, -8.87 + 0j, 0 + 0j, 0 + 0j],
              [2.21 + 0.21j, -1.84 + 0.03j, -4.63 + 0j, 0 + 0j],
              [
                  3.91 - 1.50j,
                  -1.78 - 1.18j,
                  0.11 - 0.11j,
                  -1.84 + 0.00j,
              ],
          ]
      )
      for x in (b, c, d):
          l, d, p = ldl(x)
          assert_allclose(
              l.dot(d).dot(l.T), x, atol=spacing(1000.0), rtol=0
          )
  
          u, d, p = ldl(x, lower=False)
          assert_allclose(
              u.dot(d).dot(u.T), x, atol=spacing(1000.0), rtol=0
          )
  
      l, d, p = ldl(a, hermitian=False)
      assert_allclose(
          l.dot(d).dot(l.T), a, atol=spacing(1000.0), rtol=0
      )
  
      u, d, p = ldl(a, lower=False, hermitian=False)
      assert_allclose(
          u.dot(d).dot(u.T), a, atol=spacing(1000.0), rtol=0
      )
  
      # Use upper part for the computation and use the lower part for comparison
      l, d, p = ldl(e.conj().T, lower=0)
      assert_allclose(
          tril(l.dot(d).dot(l.conj().T) - e),
          zeros((4, 4)),
          atol=spacing(1000.0),
          rtol=0,
      )
  
file_path: catboost/contrib/python/scipy/py3/scipy/linalg/tests/test_decomp_ldl.py
imports: import itertools
  from numpy.testing import assert_array_almost_equal, assert_allclose, assert_
  from numpy import array, eye, zeros, empty_like, empty, tril_indices_from, tril, triu_indices_from, spacing, float32, float64, complex64, complex128
  from numpy.random import rand, randint, seed
  from scipy.linalg import ldl
  from pytest import raises, warns
  from numpy import ComplexWarning
label_desc: Use image node_id 3 for calling a global function with example usage: test_simple() without return types