def scrub_uuid(string):
    """Scrub any existing `"_uuid"` suffix from `string`."""
    idx = string.rfind("_")
    if idx != -1:
        maybe_uuid = string[(idx + 1):]
        if len(maybe_uuid) == 32:
            try:
                _ = int(maybe_uuid, base=16)
            except ValueError:
                pass
            else:  # yes, it was an uuid
                return string[:idx]
    return string