def time_me_with_prefix(prefix):
    """
    Wrapper for testing the function time
    Args:
        prefix: add a string to the function name itself

    Returns: None

    """
    def decorator(fn):
        def _wrapper(*args, **kwargs):
            start = time.time()
            ret = fn(*args, **kwargs)
            print(prefix, "function: %s cost %s second" % (fn.__name__, time.time() - start))
            return ret

        return _wrapper

    return decorator

    Wrapper for testing the function time
    Args:
        prefix: add a string to the function name itself

    Returns: None

    
metadrive/utils/utils.py