code: def convert_to_transformers():
      farm_model_dir = Path("../saved_models/bert-english-qa-large")
  
      # load from FARM format
      model = AdaptiveModel.load(farm_model_dir, device="cpu")
      tokenizer = Tokenizer.load(farm_model_dir)
  
      # convert to transformers
      transformer_model = Converter.convert_to_transformers(model)[0]
      # Alternative way to convert to transformers:
      # transformer_model = model.convert_to_transformers()[0]
  
      # save it (Note: transformers uses strings rather than Path objects)
      model_dir = (
          "../saved_models/bert-large-uncased-whole-word-masking-squad2"
      )
      os.makedirs(model_dir, exist_ok=True)
      transformer_model.save_pretrained(model_dir)
      tokenizer.save_pretrained(model_dir)
  
      # run predictions (using transformers)
      nlp = pipeline(
          "question-answering", model=model_dir, tokenizer=model_dir
      )
      res = nlp(
          {
              "question": "Why is model conversion important?",
              "context": "The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.",
          }
      )
      pprint.pprint(res)
  
file_path: FARM/examples/conversion_huggingface_models.py
imports: from farm.modeling.adaptive_model import AdaptiveModel
  from farm.modeling.tokenization import Tokenizer
  from farm.conversion.transformers import Converter
  from farm.infer import Inferencer
  import pprint
  from transformers.pipelines import pipeline
  import os
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_transformers() without return types