code: def test_with_mapping_annotations():
      mapping = aes(
          x=as_discrete("v1", order_by="v2"),
          y=as_discrete("v2", order_by="v1"),
          a=as_discrete("v1", order=-1),
          b=as_discrete("v2", levels=[2, 1]),
      )
      data_meta = get_data_meta(data_dict2, mapping)
      expected_mapping_annotations = [
          {
              "aes": "x",
              "annotation": "as_discrete",
              "parameters": {
                  "label": "v1",
                  "order_by": "v2",
                  "order": None,
              },
          },
          {
              "aes": "a",
              "annotation": "as_discrete",
              "parameters": {
                  "label": "v1",
                  "order_by": None,
                  "order": -1,
              },
          },
      ]
      expected_factor_levels = [
          {"column": "v2", "factor_levels": [2, 1], "order": None}
      ]
      assert expected_factor_levels == data_meta["series_annotations"]
      assert (
          expected_mapping_annotations
          == data_meta["mapping_annotations"]
      )
  
file_path: lets-plot/python-package/test/plot/test_series_annotations.py
imports: from datetime import datetime
  from pandas import DataFrame, Categorical
  from lets_plot import aes
  from lets_plot.mapping import as_discrete
  from lets_plot.plot.util import as_annotated_data
label_desc: Use image node_id 11 for calling a global function with example usage: test_with_mapping_annotations() without return types