code: def _create_pvt2(variant, pretrained=False, **kwargs):
      default_out_indices = tuple(range(4))
      out_indices = kwargs.pop("out_indices", default_out_indices)
      model = build_model_with_cfg(
          PyramidVisionTransformerV2,
          variant,
          pretrained,
          pretrained_filter_fn=_checkpoint_filter_fn,
          feature_cfg=dict(
              flatten_sequential=True, out_indices=out_indices
          ),
          **kwargs,
      )
      return model
  
imports: import math
  from typing import Tuple, List, Callable, Union
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, to_ntuple, trunc_normal_, LayerNorm, use_fused_attn
  from ._builder import build_model_with_cfg
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 2 for calling a global function with example usage: _create_pvt2(variant, pretrained) and returns: model