That's because Keystone only creates ID in that format in its database, which means that this format is what gets passed in to our API (and our API doesn't do any validation against the project ID).  If this intention of this patch is to tell the user that the format is most likely invalid in Keystone, you are validating against a 32 hex format of UUID, which I think the method you are creating should be named instead of 'is_valid_keystone_project_id' since the content of the method does not contain anything specific to Keystone.  In fact, Keystone roles/userId (or even non-Keystone ID) might be treated their ID the same and this validation code will be re-usable for all of them.