<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_objects(self, bucket_name, prefix='', recursive=False):
 """ List objects in the given bucket. Examples: objects = minio.list_objects('foo') for current_object in objects: print(current_object) # hello # hello/ # hello/ # world/ objects = minio.list_objects('foo', prefix='hello/') for current_object in objects: print(current_object) # hello/world/ objects = minio.list_objects('foo', recursive=True) for current_object in objects: print(current_object) # hello/world/1 # world/world/2 objects = minio.list_objects('foo', prefix='hello/', recursive=True) for current_object in objects: print(current_object) # hello/world/1 # hello/world/2 :param bucket_name: Bucket to list objects from :param prefix: String specifying objects returned must begin with :param recursive: If yes, returns all objects for a specified prefix :return: An iterator of objects in alphabetical order. """

        is_valid_bucket_name(bucket_name)

        # If someone explicitly set prefix to None convert it to empty string.
        if prefix is None:
            prefix = ''

        method = 'GET'

        # Initialize query parameters.
        query = {
            'max-keys': '1000',
            'prefix': prefix
        }

        # Delimited by default.
        if not recursive:
            query['delimiter'] = '/'

        marker = ''
        is_truncated = True
        while is_truncated:
            if marker:
                query['marker'] = marker
            headers = {}
            response = self._url_open(method,
                                      bucket_name=bucket_name,
                                      query=query,
                                      headers=headers)
            objects, is_truncated, marker = parse_list_objects(response.data,
                                                               bucket_name=bucket_name)
            for obj in objects:
                yield obj