code: def test_score_titanic(self):
      scorer = K2Score(self.titanic_data2)
      titanic = BayesianNetwork(
          [("Sex", "Survived"), ("Pclass", "Survived")]
      )
      self.assertAlmostEqual(scorer.score(titanic), -1891.0630673606006)
      titanic2 = BayesianNetwork([("Pclass", "Sex")])
      titanic2.add_nodes_from(["Sex", "Survived", "Pclass"])
      self.assertLess(scorer.score(titanic2), scorer.score(titanic))
  
imports: import unittest
  import pandas
  from pgmpy.estimators import AICScore, BDeuScore, BDsScore, BicScore, K2Score
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 3 for calling the TestK2Score obj's underlying member method code with example usage: obj.test_score_titanic() without return types