code: def load_bert(config: Config) -> Tuple[AutoModel, AutoTokenizer]:
      """
      Loads bert and bert tokenizer as pytorch modules.
  
      Bert model is loaded to the device specified in config.device
      """
      logger.debug(f"Loading {config.bert_model}...")
  
      base_bert_name = config.bert_model.split("/")[-1]
      tokenizer_kwargs = config.tokenizer_kwargs.get(base_bert_name, {})
      if tokenizer_kwargs:
          logger.debug(f"Using tokenizer kwargs: {tokenizer_kwargs}")
      tokenizer = AutoTokenizer.from_pretrained(
          config.bert_model, **tokenizer_kwargs
      )
  
      model = AutoModel.from_pretrained(config.bert_model).to(
          config.device
      )
  
      logger.debug("Bert successfully loaded.")
  
      return model, tokenizer
  
imports: import logging
  from typing import List, Tuple
  import numpy
  from transformers import AutoModel, AutoTokenizer
  from stanza.models.coref.config import Config
  from stanza.models.coref.const import Doc
label_desc: Use image node_id 2 for calling a global function with example usage: load_bert(config) and returns: model,  tokenizer