def _copy_if_lds(item):
 return (copy.deepcopy(item) if isinstance(item, (list, dict, set)) else item)

def _copy_if_lds ( item ) : return ( copy . deepcopy ( item ) if isinstance ( item , ( list , dict , set ) ) else item )
deepcopy lists/dicts/sets .