code: def test_vindex(
      data1, provenance1, data2, provenance2, data3, provenance3
  ):
      if provenance1:
          data1 = ProvenanceTensor(data1, frozenset(provenance1))
      if provenance2:
          data2 = ProvenanceTensor(data2, frozenset(provenance2))
      if provenance3:
          data3 = ProvenanceTensor(data3, frozenset(provenance3))
  
      expected = frozenset(provenance1 + provenance2 + provenance3)
      result = Vindex(data1)[data2.long().unsqueeze(-1), data3]
      actual = getattr(result, "_provenance", frozenset())
      assert actual == expected
  
file_path: funsor/test/torch/test_provenance.py
imports: import pytest
  import torch
  from pyro.ops.indexing import Vindex
  from funsor.torch.provenance import ProvenanceTensor
label_desc: Use image node_id 4 for calling a global function with example usage: test_vindex(data1, provenance1, data2, provenance2, data3, provenance3) without return types