code: def test_image_feature_generates_correct_ouput(self) -> None:
      attribution = torch.zeros(1, 3, 4, 4)
      data = torch.ones(1, 3, 4, 4)
      contribution = 1.0
      name = "photo"
  
      orig_fig = Figure(figsize=(4, 4))
      attr_fig = Figure(figsize=(4, 4))
  
      def mock_viz_attr(*args, **kwargs):
          if kwargs["method"] == "original_image":
              return orig_fig, None
          else:
              return attr_fig, None
  
      feature = ImageFeature(
          name=name,
          baseline_transforms=None,
          input_transforms=None,
          visualization_transform=None,
      )
  
      with patch(
          "captum.attr._utils.visualization.visualize_image_attr",
          mock_viz_attr,
      ):
          feature_output = feature.visualize(
              attribution, data, contribution
          )
          expected_feature_output = FeatureOutput(
              name=name,
              base=_convert_figure_base64(orig_fig),
              modified=_convert_figure_base64(attr_fig),
              type="image",
              contribution=contribution,
          )
  
          self.assertEqual(expected_feature_output, feature_output)
  
file_path: captum/tests/insights/test_features.py
imports: from unittest.mock import patch
  import torch
  from captum.insights.attr_vis.features import _convert_figure_base64, EmptyFeature, FeatureOutput, GeneralFeature, ImageFeature, TextFeature
  from matplotlib.figure import Figure
  from tests.helpers.basic import BaseTest
label_desc: Use image node_id 1 for calling the TestImageFeature obj's underlying member method code with example usage: obj.test_image_feature_generates_correct_ouput() and returns: orig_fig,  None, attr_fig,  None