code: def test_series_plot_alpha(data, kind, info):
      col = info["col"]
      kwds = info.get("kwds", {})
      data = data[col]
  
      chart = data.vgplot(kind=kind, alpha=0.5, **kwds)
      validate_vegalite(chart)
      encoding = chart["encoding"].to_dict()
      assert "opacity" in encoding, encoding.keys()
      assert encoding["opacity"]["value"] == 0.5
  
      chart = data.vgplot(kind=kind, **kwds)
      validate_vegalite(chart)
      assert "opacity" not in chart["encoding"].to_dict()
  
file_path: pdvega/pdvega/tests/test_core_common.py
imports: import pytest
  import pandas
  import pdvega
  from .utils import validate_vegalite
label_desc: Use image node_id 5 for calling a global function with example usage: test_series_plot_alpha(data, kind, info) without return types