human
Complete the below
def cloned_traverse(obj, opts, visitors):

    ''''clone the given expression structure, allowing
    modifications by visitors.'
    '''

=====
Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    cloned = {}
    stop_on = set(opts.get('stop_on', []))
    def clone(elem):
        if (elem in stop_on):
            return elem
        else:
            if (id(elem) not in cloned):
                cloned[id(elem)] = newelem = elem._clone()
                newelem._copy_internals(clone=clone)
                meth = visitors.get(newelem.__visit_name__, None)
                if meth:
                    meth(newelem)
            return cloned[id(elem)]
    if (obj is not None):
        obj = clone(obj)
    return obj