code: def test_scale_x_discrete():
      spec = gg.scale_x_discrete(name="N", breaks=[1, 2])
      as_dict = spec.as_dict()
      assert as_dict["aesthetic"] == "x"
      assert as_dict["name"] == "N"
      assert as_dict["discrete"]
  
imports: import pytest
  import lets_plot
  from lets_plot.plot.core import FeatureSpec
  from lets_plot.plot.core import FeatureSpecArray
  from lets_plot.plot.scale import _scale
label_desc: Use image node_id 7 for calling a global function with example usage: test_scale_x_discrete() without return types