def data_to_lambda(data):
 return (lambda *args, **kwargs: copy.deepcopy(data))

def data_to_lambda ( data ) : return ( lambda * args , ** kwargs : copy . deepcopy ( data ) )
create a lambda function that takes arbitrary arguments and returns a deep copy of the passed data .