code: def test_tensor_list_dtype(self):
      for arr in (
          [1],
          [[[1]]],
          [[1, 1], [1, 1]],
          [[[1, 1], [1, 1]], [[1, 1], [1, 1]]],
      ):
          assert Tensor(arr).dtype == dtypes.default_int
          assert (
              Tensor(arr, dtype=dtypes.float32).dtype == dtypes.float32
          )
          assert (
              Tensor(arr, dtype=dtypes.float64).dtype == dtypes.float64
          )
  
      for arr in (
          [True],
          [[[False]]],
          [[True, False], [True, False]],
          [
              [[False, True], [False, False]],
              [[True, True], [False, True]],
          ],
      ):
          assert Tensor(arr).dtype == dtypes.bool
          assert (
              Tensor(arr, dtype=dtypes.float32).dtype == dtypes.float32
          )
          assert (
              Tensor(arr, dtype=dtypes.float64).dtype == dtypes.float64
          )
  
      # empty tensor defaults
      for arr in ([], [[[]]], [[], []]):
          t = Tensor(arr)
          assert t.dtype == dtypes.default_float
          np.testing.assert_allclose(t.numpy(), np.array(arr))
  
      # mixture of bool and int
      for arr in (
          [True, 3],
          [[True], [3]],
          [[[True]], [[3]]],
          [[True, 3], [3, True]],
      ):
          t = Tensor(arr)
          assert t.dtype == dtypes.default_int
          np.testing.assert_allclose(t.numpy(), np.array(arr))
  
      # mixture of bool, int and float
      for arr in (
          [[True, True], [3.0, True]],
          [[0, 1], [3.0, 4]],
          [[[0], [1]], [[3.0], [4]]],
          [[[True], [1]], [[3.0], [4]]],
      ):
          t = Tensor(arr)
          assert t.dtype == dtypes.default_float
          np.testing.assert_allclose(t.numpy(), np.array(arr))
  
imports: import numpy
  import torch
  import unittest, copy
  import mmap
  from tinygrad import Tensor, Device, dtypes
  from tinygrad.helpers import temp
  from extra.gradcheck import numerical_jacobian, jacobian, gradcheck
label_desc: Use image node_id 20 for calling the TestTinygrad obj's underlying member method code with example usage: obj.test_tensor_list_dtype() without return types