code: def test_freeze():
      model = SemanticSegmentation(2)
      model.freeze()
      for p in model.backbone.parameters():
          assert p.requires_grad is False
  
imports: from typing import Any
  from unittest.mock import patch
  import numpy
  import pytest
  import torch
  from flash import Trainer
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _SEGMENTATION_MODELS_AVAILABLE, _TOPIC_IMAGE_AVAILABLE, _TOPIC_SERVE_AVAILABLE
  from flash.image import SemanticSegmentation
  from flash.image.segmentation.data import SemanticSegmentationData
  from torch import Tensor
  from tests.helpers.task_tester import TaskTester
label_desc: Use image node_id 2 for calling a global function with example usage: test_freeze() without return types