def to_gb(bytes):
    """
    This was moved from dbaas.py so that it could be used as
    widely as a utility function. The tests corresponding to
    this were also moved out from test_dbaas.py to test_utils.py.
    """
    if bytes == 0:
        return 0.0
    size = bytes / 1024.0 ** 3
    return max(round(size, 2), 0.01)
