human
I wrote the below code

    def test_can_create(self, **kwargs):
        if (self.user_id is None):
            raise self.NotLoggedInException
        if (role_services.ACTION_CREATE_COLLECTION in self.actions):
            return handler(self, **kwargs)
        else:
            raise base.UserFacingExceptions.UnauthorizedUserException('You    do    not    have    credentials    to    create    a    collection.')
    test_can_create.__wrapped__ = True
    return test_can_create

What's a good function header?
assistant
#Here's a good function header.

def can_create_collection(handler):