def METHOD_NAME(node, state):
    """
    Check whether the node has expected state
    """
    rc, stdout, stderr = crmshutils.get_stdout_stderr('crm_node -l')
    if rc != 0:
        msg_error(stderr)
        return False
    pattern = re.compile(r'^.* {} {}'.format(node, state), re.MULTILINE)
    if not pattern.search(stdout):
        return False
    return True