code: def test_inference_data(self, data, eight_schools_params):
      inference_data1 = self.get_inference_data(
          data, eight_schools_params
      )
      inference_data2 = self.get_inference_data2(
          data, eight_schools_params
      )
      inference_data3 = self.get_inference_data3(
          data, eight_schools_params
      )
      inference_data4 = self.get_inference_data4(
          data, eight_schools_params
      )
      inference_data5 = self.get_inference_data5(
          data, eight_schools_params
      )
  
      # inference_data 1
      test_dict = {
          "posterior": ["theta"],
          "predictions": ["y_hat"],
          "observed_data": ["y"],
          "constant_data": ["y"],
          "predictions_constant_data": ["y"],
          "log_likelihood": ["y", "~log_lik"],
          "prior": ["theta"],
      }
      fails = check_multiple_attrs(test_dict, inference_data1)
      assert not fails
  
      # inference_data 2
      test_dict = {
          "posterior_predictive": ["y_hat"],
          "predictions": ["y_hat", "log_lik"],
          "observed_data": ["y"],
          "sample_stats_prior": ["lp"],
          "sample_stats": ["lp"],
          "constant_data": list(eight_schools_params),
          "predictions_constant_data": list(eight_schools_params),
          "prior_predictive": ["y_hat"],
          "log_likelihood": ["log_lik", "y_hat"],
      }
      fails = check_multiple_attrs(test_dict, inference_data2)
      assert not fails
  
      # inference_data 3
      test_dict = {
          "posterior_predictive": ["y_hat"],
          "observed_data": ["y"],
          "sample_stats_prior": ["lp"],
          "sample_stats": ["lp"],
          "prior_predictive": ["y_hat"],
          "log_likelihood": ["log_lik"],
      }
      fails = check_multiple_attrs(test_dict, inference_data3)
      assert not fails
      assert (
          inference_data3.posterior.eta.dtype.kind == "i"
      )  # pylint: disable=no-member
      assert (
          inference_data3.posterior.theta.dtype.kind == "i"
      )  # pylint: disable=no-member
  
      # inference_data 4
      test_dict = {
          "posterior": ["eta", "mu", "theta"],
          "prior": ["theta"],
          "~log_likelihood": [""],
      }
      fails = check_multiple_attrs(test_dict, inference_data4)
      assert not fails
      assert (
          len(inference_data4.posterior.theta.shape) == 3
      )  # pylint: disable=no-member
      assert (
          len(inference_data4.posterior.eta.shape) == 4
      )  # pylint: disable=no-member
      assert (
          len(inference_data4.posterior.mu.shape) == 2
      )  # pylint: disable=no-member
      assert (
          inference_data4.posterior.eta.dtype.kind == "i"
      )  # pylint: disable=no-member
      assert (
          inference_data4.posterior.theta.dtype.kind == "i"
      )  # pylint: disable=no-member
  
      # inference_data 5
      test_dict = {
          "posterior": ["eta", "mu", "theta"],
          "prior": ["theta"],
          "log_likelihood": ["log_lik"],
      }
      fails = check_multiple_attrs(test_dict, inference_data5)
      assert (
          inference_data5.posterior.eta.dtype.kind == "i"
      )  # pylint: disable=no-member
      assert inference_data5.posterior.theta.dtype.kind == "i"
  
imports: import os
  import sys
  import tempfile
  from glob import glob
  import numpy
  import pytest
  from ...None import from_cmdstanpy
  from ..helpers import chains, check_multiple_attrs, draws, eight_schools_params, importorskip, load_cached_models, pystan_version
label_desc: Use image node_id 13 for calling the TestDataCmdStanPy obj's underlying member method code with example usage: obj.test_inference_data(data, eight_schools_params) without return types