def edit_collection(self, collection_id, added_media_ids):
        """
        Add media IDs to an existing collection.

        :param collection_id: Collection ID
        :param added_media_ids: list of media IDs
        :return: Returns same object as :meth:`create_collection`
        """
        if isinstance(added_media_ids, str):
            added_media_ids = [added_media_ids]
        params = {
            'added_media_ids': json.dumps(added_media_ids, separators=(',', ':'))
        }
        params.update(self.authenticated_params)
        endpoint = 'collections/{collection_id!s}/edit/'.format(**{'collection_id': collection_id})
        return self._call_api(endpoint, params=params)

        Add media IDs to an existing collection.

        :param collection_id: Collection ID
        :param added_media_ids: list of media IDs
        :return: Returns same object as :meth:`create_collection`
        
instagram_private_api/endpoints/collections.py