<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_geodataframe(products):
 """Return the products from a query response as a GeoPandas GeoDataFrame with the values in their appropriate Python types. """

        try:
            import geopandas as gpd
            import shapely.wkt
        except ImportError:
            raise ImportError("to_geodataframe requires the optional dependencies GeoPandas and Shapely.")

        crs = {'init': 'epsg:4326'}  # WGS84
        if len(products) == 0:
            return gpd.GeoDataFrame(crs=crs)

        df = SentinelAPI.to_dataframe(products)
        geometry = [shapely.wkt.loads(fp) for fp in df['footprint']]
        # remove useless columns
        df.drop(['footprint', 'gmlfootprint'], axis=1, inplace=True)
        return gpd.GeoDataFrame(df, crs=crs, geometry=geometry)