code: def test_predictions_to_idata_new(self, data, eight_schools_params):
      # check creating new
      (
          inference_data,
          posterior_predictive,
      ) = self.make_predictions_inference_data(
          data, eight_schools_params
      )
      test_dict = {
          "posterior": ["mu", "tau", "eta", "theta"],
          "predictions": ["obs"],
          "~observed_data": "",
      }
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
      for key, values in posterior_predictive.items():
          ivalues = inference_data.predictions[key]
          assert (len(ivalues["chain"]) == 2) and (
              len(ivalues["draw"]) == 500
          )
  
imports: import warnings
  from typing import Dict, Tuple
  import numpy
  import pytensor.tensor
  import pytest
  from arviz import InferenceData
  from arviz.tests.helpers import check_multiple_attrs
  from numpy import ma
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1
  import pymc
  from pymc.backends.arviz import InferenceDataConverter, predictions_to_inference_data, to_inference_data
  from pymc.exceptions import ImputationWarning
label_desc: Use image node_id 7 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_predictions_to_idata_new(data, eight_schools_params) without return types