code: def checkpoint_check_fn(
      submodule,
      layer_cls: Union[nn.Module, Sequence[nn.Module]] = (
          SwinBlock,
          DeformableDetrTransformerEncoderLayer,
      ),
  ):
      return isinstance(submodule, tuple(layer_cls))
  
imports: from typing import Sequence, Union
  import torch.nn
  from mmdet.models.backbones.swin import SwinBlock
  from mmdet.models.layers.transformer.deformable_detr_layers import DeformableDetrTransformerEncoderLayer
label_desc: Use image node_id 2 for calling a global function with example usage: checkpoint_check_fn(submodule, layer_cls) and returns: isinstance