code: def _create_davit(variant, pretrained=False, **kwargs):
      default_out_indices = tuple(
          i for i, _ in enumerate(kwargs.get("depths", (1, 1, 3, 1)))
      )
      out_indices = kwargs.pop("out_indices", default_out_indices)
  
      model = build_model_with_cfg(
          DaVit,
          variant,
          pretrained,
          pretrained_filter_fn=checkpoint_filter_fn,
          feature_cfg=dict(
              flatten_sequential=True, out_indices=out_indices
          ),
          **kwargs,
      )
  
      return model
  
imports: from functools import partial
  from typing import Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, trunc_normal_, Mlp, LayerNorm2d, get_norm_layer, use_fused_attn
  from timm.layers import NormMlpClassifierHead, ClassifierHead
  from ._builder import build_model_with_cfg
  from ._features_fx import register_notrace_function
  from ._manipulate import checkpoint_seq
  from ._registry import generate_default_cfgs, register_model
label_desc: Use image node_id 4 for calling a global function with example usage: _create_davit(variant, pretrained) and returns: model