source and sink working in python