code: def onehot_encoding(label, n_classes):
      """Conduct one-hot encoding on a label vector."""
      label = label.view(-1)
      onehot = (
          torch.zeros(label.size(0), n_classes).float().to(label.device)
      )
      onehot.scatter_(1, label.view(-1, 1), 1)
  
      return onehot
  
imports: import numpy
  from sklearn.preprocessing import MinMaxScaler
  from tqdm import tqdm
  import pandas
  from torch.utils.data import Dataset
  import torch
  import torch.nn
  from torch.autograd import Function
  from torch.nn.parameter import Parameter
  import torch.nn.functional
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.model_selection import train_test_split
  import torch.optim
  from torch.utils.data import DataLoader
label_desc: Use image node_id 3 for calling a global function with example usage: onehot_encoding(label, n_classes) and returns: onehot