def chk_goids(goids, msg=None, raise_except=True):
    """check that all GO IDs have the proper format."""
    for goid in goids:
        if not goid_is_valid(goid):
            if raise_except:
                raise RuntimeError("BAD GO({GO}): {MSG}".format(GO=goid, MSG=msg))
            else:
                return goid
check that all GO IDs have the proper format.