code: def test_family_bad_priors():
      rng = np.random.default_rng(121195)
      data = pd.DataFrame(
          {
              "y": rng.normal(size=100),
              "x": rng.normal(size=100),
              "g": rng.choice(["A", "B"], size=100),
          }
      )
      likelihood = bmb.Likelihood(
          "Normal", params=["mu", "sigma"], parent="mu"
      )
      family = bmb.Family("MyNormal", likelihood, "identity")
      # Required prior is missing
      with pytest.raises(
          ValueError, match="The component 'sigma' needs a prior."
      ):
          bmb.Model("y ~ x", data, family=family)
  
      # bmb.Prior is not a prior
      with pytest.raises(
          ValueError, match="'Whatever' is not a valid prior."
      ):
          bmb.Model(
              "y ~ x", data, family=family, priors={"sigma": "Whatever"}
          )
  
imports: from os.path import dirname, join
  import pytest
  import numpy
  import pymc
  import pandas
  from scipy import special
  import bambi
label_desc: Use image node_id 7 for calling a global function with example usage: test_family_bad_priors() without return types