code: def test_virtual_evidence(self):
      virtual_evid = TabularCPD(
          "PAP",
          3,
          [[0.2], [0.3], [0.5]],
          state_names={"PAP": ["LOW", "NORMAL", "HIGH"]},
      )
      query_results = self.infer_alarm.query(
          variables=["HISTORY"], virtual_evidence=[virtual_evid]
      )
      ve_results = self.alarm_ve.query(
          variables=["HISTORY"], virtual_evidence=[virtual_evid]
      )
      self.assertTrue(query_results.__eq__(ve_results, atol=0.01))
  
      query_results = self.infer_alarm.query(
          variables=["HISTORY"],
          evidence={"PVSAT": "LOW"},
          virtual_evidence=[virtual_evid],
          joint=True,
      )
      ve_results = self.alarm_ve.query(
          variables=["HISTORY"],
          evidence={"PVSAT": "LOW"},
          virtual_evidence=[virtual_evid],
          joint=True,
      )
      self.assertTrue(query_results.__eq__(ve_results, atol=0.01))
  
imports: import unittest
  from pgmpy import config
  from pgmpy.factors.discrete import DiscreteFactor, TabularCPD
  from pgmpy.inference import ApproxInference, VariableElimination
  from pgmpy.models import DynamicBayesianNetwork
  from pgmpy.utils import get_example_model
label_desc: Use image node_id 4 for calling the TestApproxInferenceBN obj's underlying member method code with example usage: obj.test_virtual_evidence() without return types