human
I wrote the below code

    lock = threading.Lock()
    min_interval = (1.0 / float(max_per_second))
    def decorate(func):
        last_time_called = [0.0]
        @wraps(func)
        def rate_limited_function(*args, **kwargs):
            lock.acquire()
            elapsed = (time.clock() - last_time_called[0])
            left_to_wait = (min_interval - elapsed)
            if (left_to_wait > 0):
                time.sleep(left_to_wait)
            lock.release()
            ret = func(*args, **kwargs)
            last_time_called[0] = time.clock()
            return ret
        return rate_limited_function
    return decorate

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def rate_limited(max_per_second):