code: def text_preproc_fn(inp: List[str]) -> Tensor:
      return torch.tensor(
          [float(ord(elem[0])) for elem in inp]
      ).unsqueeze(0)
  
file_path: captum/tests/robust/test_min_param_perturbation.py
imports: from typing import cast, List
  import torch
  from captum.robust import MinParamPerturbation
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel_MultiLayer
  from torch import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: text_preproc_fn(inp) and returns: torch