code: def test_ex1():
      if not mpl:
          skip("matplotlib not installed")
      else:
          from sympy.physics.quantum.circuitplot import CircuitPlot
  
      c = CircuitPlot(CNOT(1, 0) * H(1), 2, labels=labeller(2))
      assert c.ngates == 2
      assert c.nqubits == 2
      assert c.labels == ["q_1", "q_0"]
  
file_path: sympy/sympy/physics/quantum/tests/test_circuitplot.py
imports: from sympy.physics.quantum.circuitplot import labeller, render_label, Mz, CreateOneQubitGate, CreateCGate
  from sympy.physics.quantum.gate import CNOT, H, SWAP, CGate, S, T
  from sympy.external import import_module
  from sympy.testing.pytest import skip
label_desc: Use image node_id 7 for calling a global function with example usage: test_ex1() without return types