<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def substr(self, name, start=None, size=None):
 """ Return a substring of the string at key ``name``. ``start`` and ``size`` are 0-based integers specifying the portion of the string to return. Like **Redis.SUBSTR** :param string name: the key name :param int start: Optional, the offset of first byte returned. If start is negative, the returned string will start at the start'th character from the end of string. :param int size: Optional, number of bytes returned. If size is negative, then that many characters will be omitted from the end of string. :return: The extracted part of the string. :rtype: string True 'c123' '78' 'bc1234567' """

        if start is not None and size is not None:
            start = get_integer('start', start)
            size = get_integer('size', size)
            return self.execute_command('substr', name, start, size)
        elif start is not None:
            start = get_integer('start', start)            
            return self.execute_command('substr', name, start)
        return self.execute_command('substr', name)