<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def modis1kmto500m(lons1km, lats1km, cores=1):
 """Getting 500m geolocation for modis from 1km tiepoints. http://www.icare.univ-lille1.fr/tutorials/MODIS_geolocation """

    if cores > 1:
        return _multi(modis1kmto500m, lons1km, lats1km, 10, cores)

    cols1km = np.arange(1354)
    cols500m = np.arange(1354 * 2) / 2.0
    lines = lons1km.shape[0]
    rows1km = np.arange(lines)
    rows500m = (np.arange(lines * 2) - 0.5) / 2.

    along_track_order = 1
    cross_track_order = 3

    satint = SatelliteInterpolator((lons1km, lats1km),
                                   (rows1km, cols1km),
                                   (rows500m, cols500m),
                                   along_track_order,
                                   cross_track_order,
                                   chunk_size=20)
    satint.fill_borders("y", "x")
    lons500m, lats500m = satint.interpolate()
    return lons500m, lats500m