def highlight_edit(
            self, highlight_id, cover_media_id=None,
            added_media_ids=[], removed_media_ids=[],
            title=None, source='story_viewer'):
        """
        Edits a highlight

        :param highlight_id: highlight_id, example 'highlight:1770000'
        :param cover_media_id: The media_id for the highlight cover image
        :param added_media_ids: List of media_id to be added
        :param removed_media_ids: List of media_id to be removed
        :param title: Title of the highlight
        :param module: The UI module via which the highlight is created
        """
        endpoint = 'highlights/{highlight_id!s}/edit_reel/'.format(
            highlight_id=highlight_id
        )

        # sanitise inputs
        if not added_media_ids:
            added_media_ids = []
        elif not isinstance(added_media_ids, list):
            raise ValueError('added_media_ids must be a list')

        if not removed_media_ids:
            removed_media_ids = []
        elif not isinstance(removed_media_ids, list):
            raise ValueError('removed_media_ids must be a list')

        if title and len(title) > 16:
            raise ValueError('title must not exceed 16 characters')

        if not (added_media_ids or removed_media_ids or cover_media_id or title):
            raise ValueError('No edited values')

        params = {
            'added_media_ids': json.dumps(added_media_ids, separators=(',', ':')),
            'removed_media_ids': json.dumps(removed_media_ids, separators=(',', ':')),
            'source': source,
        }
        if title:
            params['title'] = title
        if cover_media_id:
            cover = {
                'media_id': cover_media_id,
                'crop_rect': json.dumps(
                    [0.0, 0.21830457, 1.0, 0.78094524], separators=(',', ':'))
            }
            params['cover'] = json.dumps(cover, separators=(',', ':'))

        params.update(self.authenticated_params)
        return self._call_api(endpoint, params=params)

        Edits a highlight

        :param highlight_id: highlight_id, example 'highlight:1770000'
        :param cover_media_id: The media_id for the highlight cover image
        :param added_media_ids: List of media_id to be added
        :param removed_media_ids: List of media_id to be removed
        :param title: Title of the highlight
        :param module: The UI module via which the highlight is created
        
instagram_private_api/endpoints/highlights.py