code: def default_tensor_type(tensor_type):
      default_type = (
          torch.cuda.FloatTensor
          if torch.cuda.is_available()
          else torch.FloatTensor
      )
      torch.set_default_tensor_type(tensor_type)
      yield
      torch.set_default_tensor_type(default_type)
  
imports: import torch
  import torch.nn
  from contextlib import contextmanager
  from small_text.utils.annotations import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: default_tensor_type(tensor_type) without return types