code: def test_class_combinations_2():
      # In this case, our style has both class 'a' and 'b'.
      # The style that is defined the latest get priority.
      style = Style(
          [
              ("a b", "#ff0000"),
              ("b", "#00ff00"),
              ("a", "#0000ff"),
          ]
      )
      expected = Attrs(
          color="00ff00",
          bgcolor="",
          bold=False,
          underline=False,
          strike=False,
          italic=False,
          blink=False,
          reverse=False,
          hidden=False,
      )
      assert (
          style.get_attrs_for_style_str("class:a class:b") == expected
      )
      assert style.get_attrs_for_style_str("class:a,b") == expected
      assert style.get_attrs_for_style_str("class:a,b,c") == expected
  
      # Defining 'a' latest should give priority to 'a'.
      expected = Attrs(
          color="0000ff",
          bgcolor="",
          bold=False,
          underline=False,
          strike=False,
          italic=False,
          blink=False,
          reverse=False,
          hidden=False,
      )
      assert (
          style.get_attrs_for_style_str("class:b class:a") == expected
      )
      assert style.get_attrs_for_style_str("class:b,a") == expected
  
imports: from __future__ import annotations
  from prompt_toolkit.styles import Attrs, Style, SwapLightAndDarkStyleTransformation
label_desc: Use image node_id 3 for calling a global function with example usage: test_class_combinations_2() without return types