<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def owner(self, owner):
 """ Sets the owner of this OauthTokenReference. User name of the owner of the OAuth token within data.world. :param owner: The owner of this OauthTokenReference. :type: str """

        if owner is None:
            raise ValueError("Invalid value for `owner`, must not be `None`")
        if owner is not None and len(owner) > 31:
            raise ValueError("Invalid value for `owner`, length must be less than or equal to `31`")
        if owner is not None and len(owner) < 3:
            raise ValueError("Invalid value for `owner`, length must be greater than or equal to `3`")
        if owner is not None and not re.search('[a-z0-9](?:-(?!-)|[a-z0-9])+[a-z0-9]', owner):
            raise ValueError("Invalid value for `owner`, must be a follow pattern or equal to `/[a-z0-9](?:-(?!-)|[a-z0-9])+[a-z0-9]/`")

        self._owner = owner