<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_subscription_by_channel_id_and_endpoint_id( self, channel_id, endpoint_id):
 """ Search for subscription by a given channel and endpoint """

        subscriptions = self.search_subscriptions(
            channel_id=channel_id, endpoint_id=endpoint_id)

        try:
            return subscriptions[0]
        except IndexError:
            raise DataFailureException(url, 404, "No subscription found")