<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_celery(self, celery):
 """Registers the celery tasks on the hub object."""


        count = next(self.counter)

        def task_with_hub(f, **opts):
            @functools.wraps(f)
            def wrapper(*args, **kwargs):
                return f(self, *args, **kwargs)
            # Make sure newer instances don't overwride older ones.
            wrapper.__name__ = wrapper.__name__ + '_' + str(count)
            return celery.task(**opts)(wrapper)

        # tasks for internal use:
        self.subscribe = task_with_hub(subscribe)
        self.unsubscribe = task_with_hub(unsubscribe)

        max_attempts = self.config.get('MAX_ATTEMPTS', 10)
        make_req = task_with_hub(make_request_retrying, bind=True,
                                 max_retries=max_attempts)
        self.make_request_retrying = make_req

        # user facing tasks

        # wrapped by send_change_notification:
        self.send_change = task_with_hub(send_change_notification)

        # wrapped by cleanup_expired_subscriptions
        @task_with_hub
        def cleanup(hub):
            self.storage.cleanup_expired_subscriptions()
        self.cleanup = cleanup

        # wrapped by schedule_cleanup
        def schedule(every_x_seconds=A_DAY):
            celery.add_periodic_task(every_x_seconds,
                                     self.cleanup_expired_subscriptions.s())
        self.schedule = schedule