code: def maybe_half(tensor):
      if FP16_ENABLED and tensor.type().split(".")[-1] == "FloatTensor":
          return tensor.half()
      else:
          return tensor
  
imports: from contextlib import contextmanager
  from .None import cuda
label_desc: Use image node_id 4 for calling a global function with example usage: maybe_half(tensor) and returns: tensor, tensor