Explain how you determine whether a given binary tree is a binary search tree and outline an efficient approach.
Implement is_valid_bst(root), where each node is represented by an object with integer value and nullable left and right child fields. Return true only when every left descendant is strictly smaller and every right descendant is strictly larger than its ancestors. An empty tree is valid.
def is_valid_bst(root):