human
Can you provide a the Python code you requested given the following:
Complete the below
def adapt_criterion_to_null(crit, nulls):

    ''''given criterion containing bind params, convert selected elements
    to IS NULL.'
    '''
assistant
#Here is the Python code you requested.
    def visit_binary(binary):
        if (isinstance(binary.left, BindParameter) and (binary.left._identifying_key in nulls)):
            binary.left = binary.right
            binary.right = Null()
            binary.operator = operators.is_
            binary.negate = operators.isnot
        elif (isinstance(binary.right, BindParameter) and (binary.right._identifying_key in nulls)):
            binary.right = Null()
            binary.operator = operators.is_
            binary.negate = operators.isnot
    return visitors.cloned_traverse(crit, {}, {'binary': visit_binary})