code: def to_cuda(self):
      if not self.int8:
          for k, v in self.weights.items():
              self.weights[k] = v.cuda()
      else:
          h_scale_list = {}
          for k, v in self.weights.items():
              if "amaxList" in k:
                  k_h = k.replace("amaxList", "h_amaxList")
                  h_scale_list[k_h] = v
              self.weights[k] = v.cuda()
          for k, v in h_scale_list.items():
              self.weights[k] = v
  
imports: from typing import List, Optional
  from loguru import logger
  from nebullvm.optional_modules.torch import torch, torch_distributed
  from nebullvm.optional_modules.huggingface import BertConfig, BertEmbeddings, BertEncoder, BertPooler, BertPreTrainedModel
  from .checkpoint_quantization import checkpoint_quantization
label_desc: Use image node_id 3 for calling the EncoderWeights obj's underlying member method code with example usage: obj.to_cuda() without return types