code: def test_extra_namespace():
      """Tests the formula can access an additional namespace"""
      data = bmb.load_data("carclaims")
      extra_namespace = {"levels": data["veh_body"].unique()}
      formula = "numclaims ~ 0 + C(veh_body, levels=levels)"
      model = bmb.Model(
          formula,
          data,
          family="poisson",
          link="log",
          extra_namespace=extra_namespace,
      )
      term = model.response_component.terms[
          "C(veh_body, levels=levels)"
      ]
      assert (
          np.asarray(term.levels) == data["veh_body"].unique()
      ).all()
  
imports: import logging
  from functools import reduce
  from operator import add
  from os.path import dirname, join
  import arviz
  import numpy
  import pandas
  import pymc
  import pytest
  from formulae import design_matrices
  import bambi
  from bambi.terms import CommonTerm, GroupSpecificTerm
label_desc: Use image node_id 30 for calling a global function with example usage: test_extra_namespace() without return types