code: def as_tensor(
      data,
      *,
      dtype=None,
      device=None,
  ):
      if dtype is None:
          if isinstance(data, int):
              dtype = ivy.int64
          elif isinstance(data, float):
              dtype = torch_frontend.get_default_dtype()
          elif isinstance(data, (list, tuple)):
              if all(isinstance(d, int) for d in data):
                  dtype = ivy.int64
              else:
                  dtype = torch_frontend.get_default_dtype()
      return ivy.asarray(data, dtype=dtype, device=device)
  
imports: import ivy
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back, to_ivy_shape
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  import ivy.functional.frontends.torch
label_desc: Use image node_id 3 for calling a global function with example usage: as_tensor(data) and returns: ivy