code: def test_format_attr(self, template, values, mask) -> None:
      tt_input = TextTemplateInput(template, values, mask=mask)
  
      attr = torch.tensor([[0.1, 0.2]])
  
      assertTensorAlmostEqual(
          self,
          tt_input.format_attr(attr),
          torch.tensor([[0.1, 0.2, 0.1, 0.2]]),
      )
  
file_path: captum/tests/attr/test_interpretable_input.py
imports: import torch
  from captum.attr._utils.interpretable_input import TextTemplateInput, TextTokenInput
  from parameterized import parameterized
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
label_desc: Use image node_id 4 for calling the TestTextTemplateInput obj's underlying member method code with example usage: obj.test_format_attr(template, values, mask) without return types