return calc(i + 1, j, m1) + calc(i - 1, j, m2) + calc(i, j + 1, m3) + calc(i,
    j - 1, m4)

def do_the_robot_thing(m, n):
    mat = [([0] * n) for x in range(m)]
return calc(0, 0, mat)
print(do_the_robot_thing(3, 3))
Count the number of possible paths through a grid