<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_neighbor_data(self, neighbor_side, data, key, field):
 """ Assign data from the 'key' tile to the edge on the neighboring tile which is on the 'neighbor_side' of the 'key' tile. The data is assigned to the 'field' attribute of the neihboring tile's edge. """

        i = self.keys[key]
        found = False
        sides = []
        if 'left' in neighbor_side:
            if i % self.n_cols == 0:
                return None
            i -= 1
            sides.append('right')
            found = True
        if 'right' in neighbor_side:
            if i % self.n_cols == self.n_cols - 1:
                return None
            i += 1
            sides.append('left')
            found = True
        if 'top' in neighbor_side:
            sides.append('bottom')
            i -= self.n_cols
            found = True
        if 'bottom' in neighbor_side:
            sides.append('top')
            i += self.n_cols
            found = True
        if not found:
            print "Side '%s' not found" % neighbor_side
        # Check if i is in range
        if i < 0 or i >= self.n_chunks:
            return None
        # Otherwise, set the data
        for side in sides:
            self.set_i(i, data, field, side)