def METHOD_NAME(data, tag, preload=None):
    """
    Fire an event off up to the master server
    CLI Example:
    .. code-block:: bash
        salt '*' event.fire_master '{"data":"my event data"}' 'tag'
    """
    if (
        __opts__.get("local", None) or __opts__.get("file_client", None) == "local"
    ) and not __opts__.get("use_master_when_local", False):
        #  We can't send an event if we're in masterless mode
        log.warning("Local mode detected. Event with tag %s will NOT be sent.", tag)
        return False
    if preload or __opts__.get("__cli") == "salt-call":
        # If preload is specified, we must send a raw event (this is
        # slower because it has to independently authenticate)
        if "master_uri" not in __opts__:
            __opts__["master_uri"] = "tcp://{ip}:{port}".format(
                ip=salt.utils.network.ip_bracket(__opts__["interface"]),
                port=__opts__.get("ret_port", "4506"),  # TODO, no fallback
            )
        masters = list()
        ret = True
        if "master_uri_list" in __opts__:
            for master_uri in __opts__["master_uri_list"]:
                masters.append(master_uri)
        else:
            masters.append(__opts__["master_uri"])
        auth = salt.crypt.SAuth(__opts__)
        load = {
            "id": __opts__["id"],
            "tag": tag,
            "data": data,
            "tok": auth.gen_token(b"salt"),
            "cmd": "_minion_event",
        }
        if isinstance(preload, dict):
            load.update(preload)
        for master in masters:
            with salt.channel.client.ReqChannel.factory(
                __opts__, master_uri=master
            ) as channel:
                try:
                    channel.send(load)
                    # channel.send was successful.
                    # Ensure ret is True.
                    ret = True
                except Exception:  # pylint: disable=broad-except
                    ret = False
        return ret
    else:
        # Usually, we can send the event via the minion, which is faster
        # because it is already authenticated
        try:
            return salt.utils.event.MinionEvent(__opts__, listen=False).fire_event(
                {"data": data, "tag": tag, "events": None, "pretag": None},
                "fire_master",
            )
        except Exception:  # pylint: disable=broad-except
            exc_type, exc_value, exc_traceback = sys.exc_info()
            lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
            log.debug(lines)
            return False