code: def _one_hot_with_dtype(data, num_classes, dtype, hot_value=1):
      result = torch.zeros(
          [data.size(0), num_classes], device=data.device, dtype=dtype
      )
      result.scatter_(1, data.unsqueeze(-1), hot_value)
      return result
  
imports: import torch
  from torch.distributions.normal import Normal
label_desc: Use image node_id 1 for calling a global function with example usage: _one_hot_with_dtype(data, num_classes, dtype, hot_value) and returns: result