'Places an object at the coordinate ``cords`` in ``grid``,
growing the grid and updating ``fringe``, if necessary.
Returns (0, 0) if no row or column has been prepended, (1, 0)
if a row was prepended, (0, 1) if a column was prepended and
(1, 1) if both a column and a row were prepended.'

@staticmethod
def _put_object(coords, obj, grid, fringe):

    (i, j) = coords
    offset = (0, 0)
    if (i == (-1)):
        grid.prepend_row()
        i = 0
        offset = (1, 0)
        for k in range(len(fringe)):
            ((i1, j1), (i2, j2)) = fringe[k]
            fringe[k] = (((i1 + 1), j1), ((i2 + 1), j2))
    elif (i == grid.height):
        grid.append_row()
    if (j == (-1)):
        j = 0
        offset = (offset[0], 1)
        grid.prepend_column()
        for k in range(len(fringe)):
            ((i1, j1), (i2, j2)) = fringe[k]
            fringe[k] = ((i1, (j1 + 1)), (i2, (j2 + 1)))
    elif (j == grid.width):
        grid.append_column()
    grid[(i, j)] = obj
    return offset
