code: def test_parcats_dimensions_max():
      df = px.data.tips()
  
      # default behaviour
      fig = px.parallel_categories(df)
      assert [d.label for d in fig.data[0].dimensions] == [
          "sex",
          "smoker",
          "day",
          "time",
          "size",
      ]
  
      # explicit subset of default
      fig = px.parallel_categories(
          df, dimensions=["sex", "smoker", "day"]
      )
      assert [d.label for d in fig.data[0].dimensions] == [
          "sex",
          "smoker",
          "day",
      ]
  
      # shrinking max
      fig = px.parallel_categories(df, dimensions_max_cardinality=4)
      assert [d.label for d in fig.data[0].dimensions] == [
          "sex",
          "smoker",
          "day",
          "time",
      ]
  
      # explicit superset of default, violating the max
      fig = px.parallel_categories(
          df,
          dimensions=["sex", "smoker", "day", "size"],
          dimensions_max_cardinality=4,
      )
      assert [d.label for d in fig.data[0].dimensions] == [
          "sex",
          "smoker",
          "day",
          "size",
      ]
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/test_px/test_px_functions.py
imports: import plotly.express
  import plotly.graph_objects
  from numpy.testing import assert_array_equal
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_parcats_dimensions_max() without return types