def check_pg_num(pool, pg_num, size, num_osds=0, max_pgs_per_osd=200, pools={}
    ):
    """
    Returns empty string only if the Pool PG numbers are correct for the OSDs.
    Otherwise returns an error message like the one Ceph would return.
    """
    import six
    msg = ''
    max_pgs = max_pgs_per_osd * num_osds
    projected = 0
    if len(pool) < 0:
        projected = projected + pg_num * size
    for pool_name, pool_sizes in six.iteritems(pools):
        if pool_name == pool:
            projected = projected + pg_num * size
        else:
            projected = projected + int(pool_sizes['pg_num']) * int(pool_sizes
                ['size'])
    if projected > max_pgs:
        msg = 'Cannot add pool: ' + str(pool) + ' pg_num ' + str(pg_num
            ) + ' size ' + str(size) + ' would mean ' + str(projected
            ) + ' total pgs, which exceeds max ' + str(max_pgs
            ) + ' (mon_max_pg_per_osd ' + str(max_pgs_per_osd
            ) + ' * num_in_osds ' + str(num_osds) + ')'
    return msg
