def METHOD_NAME(
    self, config: JsonDict
) -> Iterable[Tuple[str, Optional[str]]]:
    """Get the event types and state keys to include in the prejoin state."""
    room_prejoin_state_config = config.get("room_prejoin_state") or {}
    # backwards-compatibility support for room_invite_state_types
    if "room_invite_state_types" in config:
        # if both "room_invite_state_types" and "room_prejoin_state" are set, then
        # we don't really know what to do.
        if room_prejoin_state_config:
            raise ConfigError(
                "Can't specify both 'room_invite_state_types' and 'room_prejoin_state' "
                "in config"
            )
        logger.warning(_ROOM_INVITE_STATE_TYPES_WARNING)
        for event_type in config["room_invite_state_types"]:
            yield event_type, None
        return
    if not room_prejoin_state_config.get("disable_default_event_types"):
        yield from _DEFAULT_PREJOIN_STATE_TYPES_AND_STATE_KEYS
    for entry in room_prejoin_state_config.get("additional_event_types", []):
        if isinstance(entry, str):
            yield entry, None
        else:
            yield entry