<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def geosearch( self, latitude=None, longitude=None, radius=1000, title=None, auto_suggest=True, results=10, ):
 """ Search for pages that relate to the provided geocoords or near the page Args: latitude (Decimal or None):
 Latitude geocoord; must be \ coercable to decimal longitude (Decimal or None):
 Longitude geocoord; must be \ coercable to decimal radius (int):
 Radius around page or geocoords to pull back; \ in meters title (str):
 Page title to use as a geocoordinate; this has \ precedence over lat/long auto_suggest (bool):
 Auto-suggest the page title results (int):
 Number of pages within the radius to return Returns: list: A listing of page titles Raises: ValueError: If either the passed latitutde or longitude are \ not coercable to a Decimal """


        def test_lat_long(val):
            """ handle testing lat and long """
            if not isinstance(val, Decimal):
                error = (
                    "Latitude and Longitude must be specified either as "
                    "a Decimal or in formats that can be coerced into "
                    "a Decimal."
                )
                try:
                    return Decimal(val)
                except (DecimalException, TypeError):
                    raise ValueError(error)
            return val

        # end local function

        params = {"list": "geosearch", "gsradius": radius, "gslimit": results}
        if title is not None:
            if auto_suggest:
                title = self.suggest(title)
            params["gspage"] = title
        else:
            lat = test_lat_long(latitude)
            lon = test_lat_long(longitude)
            params["gscoord"] = "{0}|{1}".format(lat, lon)

        raw_results = self.wiki_request(params)

        self._check_error_response(raw_results, title)

        return [d["title"] for d in raw_results["query"]["geosearch"]]