def media_n_comments(self, media_id, n=150, reverse=False, **kwargs):
        """
        Helper method to retrieve n number of comments for a media id

        :param media_id: Media id
        :param n: Minimum number of comments to fetch
        :param reverse: Reverse list of comments (ordered by created_time)
        :param kwargs:
        :return:
        """

        endpoint = 'media/{media_id!s}/comments/'.format(**{'media_id': media_id})

        comments = []
        results = self._call_api(endpoint, query=kwargs)
        comments.extend(results.get('comments', []))

        while (((results.get('has_more_comments') and results.get('next_max_id'))
                or (results.get('has_more_headload_comments') and results.get('next_min_id')))
                and len(comments) < n):

            if results.get('has_more_comments'):
                kwargs.update({'max_id': results.get('next_max_id')})
            else:
                kwargs.update({'min_id': results.get('next_min_id')})

            results = self._call_api(endpoint, query=kwargs)
            comments.extend(results.get('comments', []))
            if not (results.get('next_max_id') or results.get('next_min_id') or results.get('comments')):
                # bail out if no max_id/min_id or comments returned
                break

        if self.auto_patch:
            [ClientCompatPatch.comment(c, drop_incompat_keys=self.drop_incompat_keys)
             for c in comments]

        return sorted(comments, key=lambda k: k['created_at_utc'], reverse=reverse)

        Helper method to retrieve n number of comments for a media id

        :param media_id: Media id
        :param n: Minimum number of comments to fetch
        :param reverse: Reverse list of comments (ordered by created_time)
        :param kwargs:
        :return:
        
instagram_private_api/endpoints/media.py