Given a 2D array and a number of generations, compute n timesteps of [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).
The rules of the game are:
1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
2. Any live cell with more than three live neighbours dies, as if by overcrowding.
3. Any live cell with two or three live neighbours lives on to the next generation.
4. Any dead cell with exactly three live neighbours becomes a live cell.
Each cell's neighborhood is the 8 cells immediately around it (i.e. [Moore Neighborhood](https://en.wikipedia.org/wiki/Moore_neighborhood)). The universe is infinite in both the x and y dimensions and all cells are initially dead - except for those specified in the arguments. The return value should be a 2d array cropped around all of the living cells. (If there are no living cells, then return `[[]]`.)
For illustration purposes, 0 and 1 will be represented as `░░` and `▓▓` blocks respectively (PHP, **C**: plain black and white squares). You can take advantage of the `htmlize` function to get a text representation of the universe, e.g.:
```python
print(htmlize(cells))
````
~~~if:c
In **C**, the initial dimensions of the GoL universe is passed into your function *by reference* via the pointers `rowptr` and `colptr`.  When expanding/contracting the GoL universe, please keep track of the dimensions of the modified grid through these two variables.
~~~
import copy
def pad(cells):
  for x in cells:
    x.append(0)
    x.insert(0, 0)
  cells.append([0] * len(cells[0]))
  cells.insert(0, [0] * len(cells[0]))
  return cells
def trim_world(cells):
  while all(i == 0 for i in cells[0]): cells.pop(0)
  while all(i == 0 for i in cells[-1]): cells.pop()
  while all(i[0] == 0 for i in cells): cells = [x[1:] for x in cells]
  while all(i[-1] == 0 for i in cells): cells = [x[:-1] for x in cells]
  return cells
def get_generation(cells, generations):
  cells = copy.deepcopy(cells)
  for g in range(generations):
    cells = pad(cells)
    new_world = copy.deepcopy(cells)
    for i in range(len(new_world)):
      for j in range(len(new_world[i])):
        count = 0
        for k in range(-1, 2):
          for l in range(-1, 2):
            try:
              if (k != 0 or l != 0) and (i + k) > -1 and (j + l) > -1 and cells[i + k][j + l]: count += 1
            except IndexError: '''meh'''
        new_world[i][j] = cells[i][j] if count == 2 else 1 if count == 3 else 0
    cells = trim_world(new_world)
  return cells


import copy
def pad(cells):
  for x in cells:
    x.append(0)
    x.insert(0, 0)
  cells.append([0] * len(cells[0]))
  cells.insert(0, [0] * len(cells[0]))
  return cells
def trim_world(cells):
  while all(i == 0 for i in cells[0]): cells.pop(0)
  while all(i == 0 for i in cells[-1]): cells.pop()
  while all(i[0] == 0 for i in cells): cells = [x[1:] for x in cells]
  while all(i[-1] == 0 for i in cells): cells = [x[:-1] for x in cells]
  return cells
def get_generation(cells, generations):
  cells = copy.deepcopy(cells)
  for g in range(generations):
    cells = pad(cells)
    new_world = copy.deepcopy(cells)
    for i in range(len(new_world)):
      for j in range(len(new_world[i])):
        count = 0
        for k in range(-1, 2):
          for l in range(-1, 2):
            try:
              if (k != 0 or l != 0) and (i + k) > -1 and (j + l) > -1 and cells[i + k][j + l]: count += 1
            except IndexError: '''meh'''
        new_world[i][j] = cells[i][j] if count == 2 else 1 if count == 3 else 0
    cells = trim_world(new_world)
  return cells

