Python Code for extrapolating Magnetic Field Lines