<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getvec(gh, lat, lon):
 """ Evaluates the vector at a given latitude and longitude for a specified set of coefficients Parameters gh : a list of gauss coefficients lat : latitude of location long : longitude of location Returns ------- vec : direction in [dec, inc, intensity] """

    sv = []
    pad = 120 - len(gh)
    for x in range(pad):
        gh.append(0.)
    for x in range(len(gh)):
        sv.append(0.)
#! convert to colatitude for MB routine
    itype = 1
    colat = 90. - lat
    date, alt = 2000., 0.  # use a dummy date and altitude
    x, y, z, f = magsyn(gh, sv, date, date, itype, alt, colat, lon)
    vec = cart2dir([x, y, z])
    vec[2] = f
    return vec