code: def test_mmdet_mask_models_predict(coco_mask_records, samples_source):
      valid_records, _ = coco_mask_records[:2], coco_mask_records[:1]
  
      size = 128
      valid_tfms = tfms.A.Adapter(
          [*tfms.A.resize_and_pad(size=size), tfms.A.Normalize()]
      )
      valid_ds = Dataset(valid_records, valid_tfms)
      model_type = models.mmdet.mask_rcnn
  
      backbone = model_type.backbones.resnet50_fpn_1x()
      backbone.config_path = samples_source / backbone.config_path
  
      model = model_type.model(backbone=backbone, num_classes=81)
  
      infer_dl = model_type.infer_dl(
          valid_ds, batch_size=2, shuffle=False
      )
      preds = model_type.predict_from_dl(
          model, infer_dl, show_pbar=False
      )
      _test_preds(preds, mask=True)
  
file_path: icevision/tests/models/mmdet/test_predict.py
imports: import pytest
  from icevision.all import *
  from icevision.models.inference_sahi import IceSahiModel
  from sahi.prediction import PredictionResult
  import albumentations
label_desc: Use image node_id 4 for calling a global function with example usage: test_mmdet_mask_models_predict(coco_mask_records, samples_source) without return types