<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toGeoCoordinateString(self, sr, coordinates, conversionType, conversionMode="mgrsDefault", numOfDigits=None, rounding=True, addSpaces=True ):
 """ The toGeoCoordinateString operation is performed on a geometry service resource. The operation converts an array of xy-coordinates into well-known strings based on the conversion type and spatial reference supplied by the user. Optional parameters are available for some conversion types. Note that if an optional parameter is not applicable for a particular conversion type, but a value is supplied for that parameter, the value will be ignored. Inputs: sr - The well-known ID of the spatial reference or a spatial reference json object. coordinates - An array of xy-coordinates in JSON format to be conversionType - The conversion type of the input strings. Allowed Values: MGRS - Military Grid Reference System USNG - United States National Grid UTM - Universal Transverse Mercator GeoRef - World Geographic Reference System GARS - Global Area Reference System DMS - Degree Minute Second DDM - Degree Decimal Minute DD - Decimal Degree conversionMode - Conversion options for MGRS and UTM conversion types. Valid conversion modes for MGRS are: mgrsDefault - Default. Uses the spheroid from the given spatial reference. mgrsNewStyle - Treats all spheroids as new, like WGS 1984. The 180 degree longitude falls into Zone 60. mgrsOldStyle - Treats all spheroids as old, like Bessel 1841. The 180 degree longitude falls into Zone 60. mgrsNewWith180InZone01 - Same as mgrsNewStyle except the 180 degree longitude falls into Zone 01. mgrsOldWith180InZone01 - Same as mgrsOldStyle except the 180 degree longitude falls into Zone 01. Valid conversion modes for UTM are: utmDefault - Default. No options. utmNorthSouth - Uses north/south latitude indicators instead of zone numbers. Non-standard. Default is recommended. numOfDigits - The number of digits to output for each of the numerical portions in the string. The default value for numOfDigits varies depending on conversionType. rounding - If true, then numeric portions of the string are rounded to the nearest whole magnitude as specified by numOfDigits. Otherwise, numeric portions of the string are truncated. The rounding parameter applies only to conversion types MGRS, USNG and GeoRef. The default value is true. addSpaces - If true, then spaces are added between components of the string. The addSpaces parameter applies only to conversion types MGRS, USNG and UTM. The default value for MGRS is false, while the default value for both USNG and UTM is true. """

        params = {
            "f": "json",
            "sr" : sr,
            "coordinates" : coordinates,
            "conversionType": conversionType
        }
        url = self._url + "/toGeoCoordinateString"
        if not conversionMode is None:
            params['conversionMode'] = conversionMode
        if isinstance(numOfDigits, int):
            params['numOfDigits'] = numOfDigits
        if isinstance(rounding, int):
            params['rounding'] = rounding
        if isinstance(addSpaces, bool):
            params['addSpaces'] = addSpaces
        return self._post(url=url,
                             param_dict=params,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port,
                             securityHandler=self._securityHandler)