code: def test__margins():
      vars = [("vs", "am"), ("gear",)]
      lst = _margins(vars, True)
      assert lst == [
          [],
          ["vs", "am"],
          ["am"],
          ["gear"],
          ["vs", "am", "gear"],
          ["am", "gear"],
      ]
  
      lst = _margins(vars, False)
      assert lst == []
  
      lst = _margins(vars, ["vs"])
      assert lst == [[], ["vs", "am"]]
  
      lst = _margins(vars, ["am"])
      assert lst == [[], ["am"]]
  
      lst = _margins(vars, ["vs", "am"])
      assert lst == [[], ["vs", "am"], ["am"]]
  
      lst = _margins(vars, ["gear"])
      assert lst == [[], ["gear"]]
  
file_path: plotnine/tests/test_utils.py
imports: import itertools
  import random
  import string
  import warnings
  import numpy
  import pandas
  from plotnine._utils import _margins, add_margins, join_keys, match, ninteraction, pivot_apply, remove_missing, uniquecols
  from plotnine.data import mtcars
label_desc: Use image node_id 1 for calling a global function with example usage: test__margins() without return types