<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getAdjacentClone(self, i, south=True):
 """ Returns adjacent clone name, either the line before or after the current line. """

        rr = xrange(i + 1, len(self)) if south else xrange(i - 1, -1, -1)
        a = self[i]
        for ix in rr:
            x = self[ix]
            if x.object != a.object:
                break
            return x
        return None