<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def snap_to_roads(client, path, interpolate=False):
 """Snaps a path to the most likely roads travelled. Takes up to 100 GPS points collected along a route, and returns a similar set of data with the points snapped to the most likely roads the vehicle was traveling along. :param path: The path to be snapped. :type path: a single location, or a list of locations, where a location is a string, dict, list, or tuple :param interpolate: Whether to interpolate a path to include all points forming the full road-geometry. When true, additional interpolated points will also be returned, resulting in a path that smoothly follows the geometry of the road, even around corners and through tunnels. Interpolated paths may contain more points than the original path. :type interpolate: bool :rtype: A list of snapped points. """


    params = {"path": convert.location_list(path)}

    if interpolate:
        params["interpolate"] = "true"

    return client._request("/v1/snapToRoads", params,
                       base_url=_ROADS_BASE_URL,
                       accepts_clientid=False,
                       extract_body=_roads_extract).get("snappedPoints", [])