<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search(self, paths_rows=None, lat=None, lon=None, address=None, start_date=None, end_date=None, cloud_min=None, cloud_max=None, limit=1, geojson=False):
 """ The main method of Search class. It searches Development Seed's Landsat API. :param paths_rows: A string in this format: "003,003,004,004". Must be in pairs and separated by comma. :type paths_rows: String :param lat: The latitude :type lat: String, float, integer :param lon: The The longitude :type lon: String, float, integer :param address: The address :type address: String :param start_date: Date string. format: YYYY-MM-DD :type start_date: String :param end_date: date string. format: YYYY-MM-DD :type end_date: String :param cloud_min: float specifying the minimum percentage. e.g. 4.3 :type cloud_min: float :param cloud_max: float specifying the maximum percentage. e.g. 78.9 :type cloud_max: float :param limit: integer specigying the maximum results return. :type limit: integer :param geojson: boolean specifying whether to return a geojson object :type geojson: boolean :returns: dict :example: 'status': u'SUCCESS', 'total_returned': 1, 'total': 1, 'limit': 1 'results': [ { 'sat_type': u'L8', 'sceneID': u'LC80030032014142LGN00', 'date': u'2014-05-22', 'path': u'003', 'cloud': 33.36, 'row': u'003 } ] } """


        search_string = self.query_builder(paths_rows, lat, lon, address, start_date, end_date, cloud_min, cloud_max)

        # Have to manually build the URI to bypass requests URI encoding
        # The api server doesn't accept encoded URIs

        r = requests.get('%s?search=%s&limit=%s' % (self.api_url, search_string, limit))

        r_dict = json.loads(r.text)
        result = {}

        if 'error' in r_dict:
            result['status'] = u'error'
            result['code'] = r_dict['error']['code']
            result['message'] = r_dict['error']['message']

        elif 'meta' in r_dict:
            if geojson:
                result = {
                    'type': 'FeatureCollection',
                    'features': []
                }
                for r in r_dict['results']:
                    feature = {
                        'type': 'Feature',
                        'properties': {
                            'sceneID': r['sceneID'],
                            'row': three_digit(r['row']),
                            'path': three_digit(r['path']),
                            'thumbnail': r['browseURL'],
                            'date': r['acquisitionDate'],
                            'cloud': r['cloud_coverage']
                        },
                        'geometry': {
                            'type': 'Polygon',
                            'coordinates': [
                                [
                                    [r['upperLeftCornerLongitude'], r['upperLeftCornerLatitude']],
                                    [r['lowerLeftCornerLongitude'], r['lowerLeftCornerLatitude']],
                                    [r['lowerRightCornerLongitude'], r['lowerRightCornerLatitude']],
                                    [r['upperRightCornerLongitude'], r['upperRightCornerLatitude']],
                                    [r['upperLeftCornerLongitude'], r['upperLeftCornerLatitude']]
                                ]
                            ]
                        }
                    }

                    result['features'].append(feature)

            else:
                result['status'] = u'SUCCESS'
                result['total'] = r_dict['meta']['found']
                result['limit'] = r_dict['meta']['limit']
                result['total_returned'] = len(r_dict['results'])
                result['results'] = [{'sceneID': i['sceneID'],
                                      'sat_type': u'L8',
                                      'path': three_digit(i['path']),
                                      'row': three_digit(i['row']),
                                      'thumbnail': i['browseURL'],
                                      'date': i['acquisitionDate'],
                                      'cloud': i['cloud_coverage']}
                                     for i in r_dict['results']]

        return result