code: def test_logq_globals(three_var_approx):
      if not three_var_approx.has_logq:
          pytest.skip("%s does not implement logq" % three_var_approx)
      approx = three_var_approx
      logq, symbolic_logq = approx.set_size_and_deterministic(
          [approx.logq, approx.symbolic_logq], 1, 0
      )
      e = logq.eval()
      es = symbolic_logq.eval()
      assert e.shape == ()
      assert es.shape == (1,)
  
      logq, symbolic_logq = approx.set_size_and_deterministic(
          [approx.logq, approx.symbolic_logq], 2, 0
      )
      e = logq.eval()
      es = symbolic_logq.eval()
      assert e.shape == ()
      assert es.shape == (2,)
  
imports: import functools
  import numpy
  import pytensor.tensor
  import pytest
  import pymc
  from pymc.variational import opvi
  from pymc.variational.approximations import Empirical, EmpiricalGroup, FullRank, FullRankGroup, MeanField, MeanFieldGroup
  from tests.helpers import not_raises
label_desc: Use image node_id 16 for calling a global function with example usage: test_logq_globals(three_var_approx) without return types