class_docstr: Interface class for the two De-randomized smoothing approaches supported by ART for pytorch.
  
  If a regular pytorch neural network is fed in then (De)Randomized Smoothing as introduced in Levine et al. (2020)
  is used.
  
  Otherwise, if a timm vision transfomer is fed in then Certified Patch Robustness via Smoothed Vision Transformers
  as introduced in Salman et al. (2021) is used.
docstr: Return the supported model names to the user.
  
  :param generate_from_null: If to re-check the creation of all the ViTs in timm from scratch.
  :return: A list of compatible models
docstr_tok: ["Return","the","supported","model","names","to","the","user",".",":","param","generate_from_null",":","If","to","re-check","the","creation","of","all","the","ViTs","in","timm","from","scratch",".",":","return",":","A","list","of","compatible","models"]
code: def get_models(cls, generate_from_null: bool = False) -> List[str]:
      """
      Return the supported model names to the user.
  
      :param generate_from_null: If to re-check the creation of all the ViTs in timm from scratch.
      :return: A list of compatible models
      """
      import timm
      import torch
  
      supported_models = [
          "vit_base_patch8_224",
          "vit_base_patch16_18x2_224",
          "vit_base_patch16_224",
          "vit_base_patch16_224_miil",
          "vit_base_patch16_384",
          "vit_base_patch16_clip_224",
          "vit_base_patch16_clip_384",
          "vit_base_patch16_gap_224",
          "vit_base_patch16_plus_240",
          "vit_base_patch16_rpn_224",
          "vit_base_patch16_xp_224",
          "vit_base_patch32_224",
          "vit_base_patch32_384",
          "vit_base_patch32_clip_224",
          "vit_base_patch32_clip_384",
          "vit_base_patch32_clip_448",
          "vit_base_patch32_plus_256",
          "vit_giant_patch14_224",
          "vit_giant_patch14_clip_224",
          "vit_gigantic_patch14_224",
          "vit_gigantic_patch14_clip_224",
          "vit_huge_patch14_224",
          "vit_huge_patch14_clip_224",
          "vit_huge_patch14_clip_336",
          "vit_huge_patch14_xp_224",
          "vit_large_patch14_224",
          "vit_large_patch14_clip_224",
          "vit_large_patch14_clip_336",
          "vit_large_patch14_xp_224",
          "vit_large_patch16_224",
          "vit_large_patch16_384",
          "vit_large_patch32_224",
          "vit_large_patch32_384",
          "vit_medium_patch16_gap_240",
          "vit_medium_patch16_gap_256",
          "vit_medium_patch16_gap_384",
          "vit_small_patch16_18x2_224",
          "vit_small_patch16_36x1_224",
          "vit_small_patch16_224",
          "vit_small_patch16_384",
          "vit_small_patch32_224",
          "vit_small_patch32_384",
          "vit_tiny_patch16_224",
          "vit_tiny_patch16_384",
      ]
  
      if not generate_from_null:
          return supported_models
  
      supported = []
      unsupported = []
  
      models = timm.list_models("vit_*")
      pbar = tqdm(models)
  
      # store in case not re-assigned in the model creation due to unsuccessful creation
      tmp_func = (
          timm.models.vision_transformer._create_vision_transformer
      )  # pylint: disable=W0212
  
      for model in pbar:
          pbar.set_description(f"Testing {model} creation")
          try:
              _ = cls(
                  model=model,
                  loss=torch.nn.CrossEntropyLoss(),
                  optimizer=torch.optim.SGD,
                  optimizer_params={"lr": 0.01},
                  input_shape=(3, 32, 32),
                  nb_classes=10,
                  ablation_size=4,
                  load_pretrained=False,
                  replace_last_layer=True,
                  verbose=False,
              )
              supported.append(model)
          except (TypeError, AttributeError):
              unsupported.append(model)
              timm.models.vision_transformer._create_vision_transformer = (
                  tmp_func  # pylint: disable=W0212
              )
  
      if supported != supported_models:
          logger.warning(
              "Difference between the generated and fixed model list. Although not necessarily "
              "an error, this may point to the timm library being updated."
          )
  
      return supported
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import importlib
  import logging
  from typing import List, Optional, Tuple, Union, Any, TYPE_CHECKING
  import random
  import numpy
  from tqdm import tqdm
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.certification.derandomized_smoothing.derandomized import DeRandomizedSmoothingMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 2 for calling the PyTorchDeRandomizedSmoothing obj's underlying member method code with example usage: obj.get_models(cls, generate_from_null) and returns: supported, supported_models