<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def split(self):
        '''Return a two element tuple containing the parent route and
        the last url bit as route. If this route is the root route, it returns
        the root route and ``None``. '''
        rule = self.rule
        if not self.is_leaf:
            rule = rule[:-1]
        if not rule:
            return Route('/'), None
        bits = ('/' + rule).split('/')
        last = Route(bits[-1] if self.is_leaf else bits[-1] + '/')
        if len(bits) > 1:
            return Route('/'.join(bits[:-1]) + '/'), last
        else:
            return last, None