Developing mathematical knowledge for teaching in a methods course: the case of function