<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(self, string):
 """Return a copy of string converted to case. Parameters string : `str` Returns ------- `str` Examples -------- 'str ing' 'STR ING' 'Str ing' 'sTr InG' """

        if self == self.__class__.TITLE:
            return capitalize(string)
        if self == self.__class__.UPPER:
            return string.upper()
        if self == self.__class__.LOWER:
            return string.lower()
        return string