Explain how you would write a unit test for a Python data transformation function to ensure its reliability before deployment.