code: def verify_counterfactual_explanations(
      self,
      counterfactual_explanations,
      total_CFs,
      num_query_points,
      version,
      local_importance_available=False,
      summary_importance_available=False,
  ):
      assert counterfactual_explanations is not None
      assert counterfactual_explanations.cf_examples_list is not None
      assert (
          len(counterfactual_explanations.cf_examples_list)
          == num_query_points
      )
      if total_CFs is not None:
          assert (
              counterfactual_explanations.cf_examples_list[
                  0
              ].final_cfs_df.shape[0]
              == total_CFs
          )
      assert counterfactual_explanations.metadata is not None
      assert counterfactual_explanations.metadata["version"] is not None
      counterfactual_explanations.metadata["version"] = version
      if local_importance_available:
          assert (
              counterfactual_explanations.local_importance is not None
          )
          assert (
              len(counterfactual_explanations.local_importance)
              == num_query_points
          )
      else:
          assert counterfactual_explanations.local_importance is None
      if summary_importance_available:
          assert (
              counterfactual_explanations.summary_importance is not None
          )
      else:
          assert counterfactual_explanations.summary_importance is None
  
file_path: DiCE/tests/test_counterfactual_explanations.py
imports: import json
  import pytest
  from raiutils.exceptions import UserConfigValidationException
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
label_desc: Use image node_id 2 for calling the TestSerializationCounterfactualExplanations obj's underlying member method code with example usage: obj.verify_counterfactual_explanations(counterfactual_explanations, total_CFs, num_query_points, version, local_importance_available, summary_importance_available) without return types