code: def check_forward_output(self, output: Any):
      assert {"masks", "labels", "scores"} <= output[0].keys()
  
imports: import collections
  import json
  import os
  from typing import Any
  import numpy
  import pytest
  import torch
  from flash import Trainer
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _ICEDATA_AVAILABLE, _ICEVISION_AVAILABLE, _TOPIC_IMAGE_AVAILABLE
  from flash.image import InstanceSegmentation, InstanceSegmentationData
  from tests.helpers.task_tester import TaskTester
label_desc: Use image node_id 2 for calling the TestInstanceSegmentation obj's underlying member method code with example usage: obj.check_forward_output(output) without return types