code: def test_marginal_color_params__get_marginal_layers():
      _COLOR_DEF = "pen"
  
      def get_spec_dict(geom_kind, color=None, color_by=None):
          return _get_marginal_layers(
              **_get_marginal_layers_props(
                  marginal="{0}:r".format(geom_kind),
                  color=color,
                  color_by=color_by,
              )
          )[0].as_dict()
  
      for geom_kind in ["dens", "hist", "box"]:
          spec_dict = get_spec_dict(geom_kind)
          assert _COLOR_DEF == spec_dict["color"]
          assert _COLOR_DEF == spec_dict["fill"]
  
          spec_dict = get_spec_dict(geom_kind, color="red")
          assert "red" == spec_dict["color"]
          assert "red" == spec_dict["fill"]
  
          spec_dict = get_spec_dict(geom_kind, color_by="color")
          assert "color" not in spec_dict
          assert "fill" not in spec_dict
  
          spec_dict = get_spec_dict(
              geom_kind, color="red", color_by="color"
          )
          assert "color" not in spec_dict
          assert "fill" not in spec_dict
  
file_path: lets-plot/python-package/test/plot/test_bistro_common.py
imports: import pytest
  from lets_plot.bistro._plot2d_common import _get_bin_params_2d, _get_geom2d_layer, _get_marginal_layers
label_desc: Use image node_id 14 for calling a global function with example usage: test_marginal_color_params__get_marginal_layers() and returns: _get_marginal_layers