code: def _char_to_onehot(self, input_char, onehot_dim=38):
      input_char = input_char.unsqueeze(1)
      batch_size = input_char.size(0)
      one_hot = (
          torch.FloatTensor(batch_size, onehot_dim).zero_().to(device)
      )
      one_hot = one_hot.scatter_(1, input_char, 1)
      return one_hot
  
file_path: EasyOCR/trainer/modules/prediction.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the Attention obj's underlying member method code with example usage: obj._char_to_onehot(input_char, onehot_dim) and returns: one_hot