code: def test_create_bool_tensors(self, device):
      expected = torch.tensor([0], dtype=torch.int64, device=device)
      self.assertEqual(
          torch.arange(False, True, device=device), expected
      )
      self.assertEqual(torch.arange(True, device=device), expected)
      expected = torch.tensor(
          [0, 0.5], dtype=torch.get_default_dtype(), device=device
      )
      self.assertEqual(
          torch.arange(False, True, 0.5, device=device), expected
      )
      expected = torch.ones(0, dtype=torch.int64, device=device)
      self.assertEqual(
          torch.arange(False, False, device=device), expected
      )
  
      bool_tensor_lin = torch.linspace(
          False, True, steps=100, device=device
      )
      int_tensor_lin = torch.linspace(0, 1, steps=100, device=device)
      self.assertEqual(bool_tensor_lin, int_tensor_lin)
      bool_tensor_log = torch.linspace(
          False, True, steps=100, device=device
      )
      int_tensor_log = torch.linspace(0, 1, steps=100, device=device)
      self.assertEqual(bool_tensor_log, int_tensor_log)
  
      # this seems like odd behavior but ints also create float tensors, numpy doesn't have this function.
      self.assertEqual(
          torch.scalar_tensor(False, device=device),
          torch.tensor(0.0, device=device),
      )
  
imports: from functools import wraps
  import itertools
  import unittest
  import torch
  from torch.testing._internal.common_utils import TestCase, run_tests, load_tests, make_tensor, TEST_NUMPY, set_default_dtype, torch_to_numpy_dtype_dict, numpy_to_torch_dtype_dict, skipIfTorchDynamo
  from torch.testing._internal.common_device_type import instantiate_device_type_tests, onlyNativeDeviceTypes, dtypes, onlyCPU, expectedFailureMeta, skipMeta
  from torch.testing._internal.common_dtype import all_types_and_complex_and, get_all_math_dtypes, floating_types, get_all_dtypes, float_to_corresponding_complex_type_map
  import numpy
  import operator
label_desc: Use image node_id 20 for calling the TestTypePromotion obj's underlying member method code with example usage: obj.test_create_bool_tensors(device) without return types