def METHOD_NAME(self, button_id, args_dict, thread=True, return_from_function=False):
    """Execute function from custom action button press."""
    try:
        run_command = getattr(self.run_function, button_id)
        if not thread or return_from_function:
            return_val = run_command(args_dict)
            if return_from_function:
                return 0, return_val
            else:
                return 0, f"Command sent to Function Controller. Returned: {return_val}"
        else:
            thread_run_command = threading.Thread(
                target=run_command,
                args=(args_dict,))
            thread_run_command.start()
            return 0, "Command sent to Function Controller and is running in the background."
    except Exception as err:
        msg = f"Error executing function '{button_id}': {err}"
        self.logger.exception(msg)
        return 1, msg