docstr: Test model is enough to get prior, prior predictive, constant_data and observed_data.
docstr_tok: ["Test","model","is","enough","to","get","prior",",","prior","predictive",",","constant_data","and","observed_data","."]
code: def test_priors_separation(self, use_context):
      """Test model is enough to get prior, prior predictive, constant_data and observed_data."""
      with pm.Model() as model:
          x = pm.MutableData("x", [1.0, 2.0, 3.0])
          y = pm.ConstantData("y", [1.0, 2.0, 3.0])
          beta = pm.Normal("beta", 0, 1)
          obs = pm.Normal("obs", x * beta, 1, observed=y)
          prior = pm.sample_prior_predictive(return_inferencedata=False)
  
      test_dict = {
          "prior": ["beta", "~obs"],
          "observed_data": ["obs"],
          "prior_predictive": ["obs"],
          "constant_data": ["x", "y"],
      }
      if use_context:
          with model:
              inference_data = to_inference_data(prior=prior)
      else:
          inference_data = to_inference_data(prior=prior, model=model)
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
  
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 20 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_priors_separation(use_context) without return types