<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replace_all_calls(mod, orig, repl):
 """Replace all calls to `orig` to `repl` in module `mod`. Returns the references to the returned calls """

    rc = ReplaceCalls(orig, repl)
    rc.visit(mod)
    return rc.calls