def get_header(self, event_type=None):

        T = current.T

        output = {}

        # Event type header
        if event_type:
            event_type_name = T(event_type.name)
        else:
            event_type_name = current.messages["NONE"]

        event_type_header = DIV(H4(SPAN(T(event_type_name),
                                        _class = "event-type-name",
                                        ),
                                   SPAN(ICON("settings"),
                                        _class = "event-type-setting",
                                        ),
                                   _class = "event-type-toggle",
                                   _id = "event-type-toggle",
                                   ),
                                _class = "event-type-header",
                                )
        output["event_type"] = event_type_header

        # Event type selector
        event_types = self.get_event_types()
        buttons = []
        for k, v in event_types.items():
            if k != "_default":
                button = LI(A(T(v.name),
                              _class = "secondary button event-type-selector",
                              data = {"code": s3_str(v.code),
                                      "name": s3_str(T(v.name)),
                                      },
                              ),
                            )
                buttons.append(button)
        output["event_type_selector"] = UL(buttons,
                                           _class="button-group stack hide event-type-selector",
                                           _id="event-type-selector",
                                           )

        return output

    # -------------------------------------------------------------------------
    # Class-specific functions
    # -------------------------------------------------------------------------
Test master state property.
dataset/ETHPy150Open sahana/eden/modules/s3db/dvr.py/DVRRegisterCaseEvent.get_header--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/components/media_player/test_universal.py/TestMediaPlayer.test_master_state_with_attrs