def METHOD_NAME(self, state: EventTypes, file_name: str, data: str) -> None:
    """
    Add a hook script to run for a given state.
    :param state: state to run hook on
    :param file_name: hook file name
    :param data: file data
    :return: nothing
    """
    logger.info("setting state hook: %s - %s", state, file_name)
    state_hooks = self.script_hooks.setdefault(state, {})
    if file_name in state_hooks:
        raise CoreError(
            f"adding duplicate state({state.name}) hook script({file_name})"
        )
    state_hooks[file_name] = data