class_docstr: Tests for `drawable_layers`
class_docstr_tok: ["Tests","for","`","drawable_layers","`"]
docstr: Test the barrier is always drawn
docstr_tok: ["Test","the","barrier","is","always","drawn"]
code: def test_barrier_only_visual(self):
      """Test the barrier is always drawn"""
  
      ops = [
          qml.PauliX(0),
          qml.Barrier(wires=0),
          qml.Barrier(only_visual=True, wires=0),
          qml.PauliX(0),
      ]
      layers = drawable_layers(ops)
      assert layers == [[ops[0]], [ops[1]], [ops[2]], [ops[3]]]
  
imports: import pytest
  import pennylane
  from pennylane.measurements import MidMeasureMP
  from pennylane.queuing import AnnotatedQueue
  from pennylane.drawer.drawable_layers import _recursive_find_layer, _recursive_find_mcm_stats_layer, drawable_layers
label_desc: Use image node_id 3 for calling the TestDrawableLayers obj's underlying member method code with example usage: obj.test_barrier_only_visual() without return types