def METHOD_NAME(node: Node, cpu: str, online: bool = False) -> bool:
    file_path = get_cpu_state_file(cpu)
    state = CPUState.OFFLINE
    if online:
        state = CPUState.ONLINE
    node.tools[Echo].write_to_file(state, node.get_pure_path(file_path), sudo=True)
    result = node.tools[Cat].read(file_path, force_run=True, sudo=True)
    return result == state