code: def test_tril_triu_dtype(self):
      # Issue 4916
      # tril and triu should return the same dtype as input
      for c in "efdFDBbhil?":  # np.typecodes["All"]:
          arr = np.zeros((3, 3), dtype=c)
          assert_equal(np.triu(arr).dtype, arr.dtype)
          assert_equal(np.tril(arr).dtype, arr.dtype)
  
imports: import functools
  from unittest import expectedFailure, skipIf
  import pytest
  from pytest import raises
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, TEST_WITH_TORCHDYNAMO, TestCase, xpassIfTorchDynamo
label_desc: Use image node_id 5 for calling the TestTri obj's underlying member method code with example usage: obj.test_tril_triu_dtype() without return types