code: def test_apply_alpha():
      """Test apply_alpha when there is a mismatch between the number of
      supplied colors and elements.
      """
      nodelist = [0, 1, 2]
      colorlist = ["r", "g", "b"]
      alpha = 0.5
      rgba_colors = nx.drawing.nx_pylab.apply_alpha(
          colorlist, alpha, nodelist
      )
      assert all(rgba_colors[:, -1] == alpha)
  
imports: import itertools
  import os
  import warnings
  import pytest
  import networkx
label_desc: Use image node_id 35 for calling a global function with example usage: test_apply_alpha() without return types