<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tune_scale(acceptance, scale):
 """ Tunes scale for M-H algorithm Parameters acceptance : float The most recent acceptance rate scale : float The current scale parameter Returns scale : float An adjusted scale parameter Notes Ross : Initially did this by trial and error, then refined by looking at other implementations, so some credit here to PyMC3 which became a guideline for this. """
     

        if acceptance > 0.8:
            scale *= 2.0
        elif acceptance <= 0.8 and acceptance > 0.4:
            scale *= 1.3            
        elif acceptance < 0.234 and acceptance > 0.1:
            scale *= (1/1.3)
        elif acceptance <= 0.1 and acceptance > 0.05:
            scale *= 0.4
        elif acceptance <= 0.05 and acceptance > 0.01:
            scale *= 0.2
        elif acceptance <= 0.01:
            scale *= 0.1
        return scale