You can simply rebind the name of an object (in this case, a module-level function) to a different object. For example, if you want to have math.cos
work with degrees instead of radians, you could do
>>> import math
>>> math.cos(90)
-0.4480736161291701
>>> old_cos = math.cos
>>> def new_cos(degrees):
... return old_cos(math.radians(degrees))
...
>>> math.cos = new_cos
>>> math.cos(90)
6.123233995736766e-17
However, that might cause problems to other functions that use that module...