code: def test_tril_triu_ndim3():
      for dtype in (
          np.typecodes["AllFloat"] + np.typecodes["AllInteger"]
      ):
          a = np.array(
              [
                  [[1, 1], [1, 1]],
                  [[1, 1], [1, 0]],
                  [[1, 1], [0, 0]],
              ],
              dtype=dtype,
          )
          a_tril_desired = np.array(
              [
                  [[1, 0], [1, 1]],
                  [[1, 0], [1, 0]],
                  [[1, 0], [0, 0]],
              ],
              dtype=dtype,
          )
          a_triu_desired = np.array(
              [
                  [[1, 1], [0, 1]],
                  [[1, 1], [0, 0]],
                  [[1, 1], [0, 0]],
              ],
              dtype=dtype,
          )
          a_triu_observed = np.triu(a)
          a_tril_observed = np.tril(a)
          assert_array_equal(a_triu_observed, a_triu_desired)
          assert_array_equal(a_tril_observed, a_tril_desired)
          assert_equal(a_triu_observed.dtype, a.dtype)
          assert_equal(a_tril_observed.dtype, a.dtype)
  
imports: from numpy.testing import assert_equal, assert_array_equal, assert_array_max_ulp, assert_array_almost_equal, assert_raises, assert_
  from numpy import arange, add, fliplr, flipud, zeros, ones, eye, array, diag, histogram2d, tri, mask_indices, triu_indices, triu_indices_from, tril_indices, tril_indices_from, vander
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_tril_triu_ndim3() without return types