Pass special argument -retries to function, so function can be aware about
retries.