def METHOD_NAME():
    with taddons.context() as tctx:
        kmc = keymap.KeymapConfig(tctx.master)
        assert kmc.parse("") == []
        assert kmc.parse("\n\n\n   \n") == []
        with pytest.raises(keymap.KeyBindingError, match="expected a list of keys"):
            kmc.parse("key: val")
        with pytest.raises(keymap.KeyBindingError, match="expected a list of keys"):
            kmc.parse("val")
        with pytest.raises(keymap.KeyBindingError, match="Unknown key attributes"):
            kmc.parse(
                """
                    -   key: key1
                        nonexistent: bar
                """
            )
        with pytest.raises(
            keymap.KeyBindingError, match="Missing required key attributes"
        ):
            kmc.parse(
                """
                    -   help: key1
                """
            )
        with pytest.raises(keymap.KeyBindingError, match="Invalid type for cmd"):
            kmc.parse(
                """
                    -   key: key1
                        cmd: [ cmd ]
                """
            )
        with pytest.raises(keymap.KeyBindingError, match="Invalid type for ctx"):
            kmc.parse(
                """
                    -   key: key1
                        ctx: foo
                        cmd: cmd
                """
            )
        assert (
            kmc.parse(
                """
                -   key: key1
                    ctx: [one, two]
                    help: one
                    cmd: >
                        foo bar
                        foo bar
            """
            )
            == [
                {
                    "key": "key1",
                    "ctx": ["one", "two"],
                    "help": "one",
                    "cmd": "foo bar foo bar\n",
                }
            ]
        )