def media_end_livestream(self, broadcast_id):
        """
        End a live broadcast.

        Parameters
        ----------
        broadcast_id : str
            The ID of the live broadcast.

        Returns
        -------
        bool
            True if the broadcast ended successfully, False otherwise.
        """
        data = {
            "_uuid": self.uuid,
            "_uid": self.user_id,
            "_csrftoken": self.token,
        }
        try:
            response = self.private_request(f"live/{broadcast_id}/end_broadcast/", data=data)
            return response.get("status") == "ok"
        except Exception as e:
            self.logger.error(f"Error ending live broadcast: {e}")
            return False

        End a live broadcast.

        Parameters
        ----------
        broadcast_id : str
            The ID of the live broadcast.

        Returns
        -------
        bool
            True if the broadcast ended successfully, False otherwise.
        
instagrapi/mixins/media.py