code: def test_text_feature_generates_correct_visualization_output(
      self,
  ) -> None:
      attribution = torch.tensor([0.1, 0.2, 0.3, 0.4])
      input_data = torch.rand(1, 2)
      expected_modified = [
          100 * x for x in (attribution / attribution.max())
      ]
      contribution_frac = torch.rand(1).item()
  
      feature = TextFeature(
          name=self.FEATURE_NAME,
          baseline_transforms=None,
          input_transforms=None,
          visualization_transform=None,
      )
  
      feature_output = feature.visualize(
          attribution, input_data, contribution_frac
      )
      expected_feature_output = FeatureOutput(
          name=self.FEATURE_NAME,
          base=input_data,
          modified=expected_modified,
          type="text",
          contribution=contribution_frac,
      )
  
      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 3 for calling the TestTextFeature obj's underlying member method code with example usage: obj.test_text_feature_generates_correct_visualization_output() without return types