code: def test_medicalnet_on_2d_data(self):
      with self.assertRaises(ValueError):
          PerceptualLoss(
              spatial_dims=2,
              network_type="medicalnet_resnet10_23datasets",
          )
  
      with self.assertRaises(ValueError):
          PerceptualLoss(
              spatial_dims=2,
              network_type="medicalnet_resnet50_23datasets",
          )
  
file_path: MONAI/tests/test_perceptual_loss.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.losses import PerceptualLoss
  from monai.utils import optional_import
  from tests.utils import SkipIfBeforePyTorchVersion, skip_if_downloading_fails, skip_if_quick
label_desc: Use image node_id 5 for calling the TestPerceptualLoss obj's underlying member method code with example usage: obj.test_medicalnet_on_2d_data() without return types