code: def test_legal_operations(self):
      model2_legal_ops = list(
          self.est_rand._legal_operations(
              model=self.model2,
              score=self.score_rand,
              structure_score=self.score_structure_prior,
              tabu_list=set(),
              max_indegree=float("inf"),
              black_list=set(),
              white_list=self.model2_possible_edges,
              fixed_edges=set(),
          )
      )
      model2_legal_ops_ref = [
          (("+", ("C", "A")), -28.15602208305154),
          (("+", ("A", "C")), -28.155467430966382),
          (("+", ("C", "B")), 7636.947544933631),
          (("+", ("B", "C")), 7937.805375579936),
          (("-", ("A", "B")), 28.155467430966382),
          (("flip", ("A", "B")), -0.0005546520851567038),
      ]
      self.assertSetEqual(
          set([op for op, score in model2_legal_ops]),
          set([op for op, score in model2_legal_ops_ref]),
      )
  
file_path: pgmpy/pgmpy/tests/test_estimators/test_HillClimbSearch.py
imports: import unittest
  import numpy
  import pandas
  from pgmpy.estimators import HillClimbSearch, K2Score
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 2 for calling the TestHillClimbEstimator obj's underlying member method code with example usage: obj.test_legal_operations() without return types