code: def replace_encoder(self, new_encoder):
      self.encoder = new_encoder
      self.use_ext_encoder = True
  
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 BertModel obj's underlying member method code with example usage: obj.replace_encoder(new_encoder) without return types