code: def _create_vision_transformer(variant, pretrained=False, **kwargs):
      if kwargs.get("features_only", None):
          raise RuntimeError(
              "features_only not implemented for \
                              Vision Transformer models."
          )
  
      pretrained_cfg = resolve_pretrained_cfg(
          variant, pretrained_cfg=kwargs.pop("pretrained_cfg", None)
      )
      model = build_model_with_cfg(
          ViTWithPrompt,
          variant,
          pretrained,
          pretrained_cfg=pretrained_cfg,
          pretrained_filter_fn=checkpoint_filter_fn,
          pretrained_custom_load="npz" in pretrained_cfg["url"],
          **kwargs,
      )
      return model
  
file_path: avalanche/avalanche/models/timm_vit.py
imports: import math
  import re
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from avalanche.models import Prompt
label_desc: Use image node_id 4 for calling a global function with example usage: _create_vision_transformer(variant, pretrained) and returns: model