<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_ping(self, rule, status_code=200, app=None):
 """Add a ping route. :param str rule: The URL rule. This will not use the API prefix, as the ping endpoint is not really part of the API. :param int status_code: The ping response status code. The default is 200 rather than the more correct 204 because many health checks look for 200s. :param app: If specified, the application to which to add the route. Otherwise, this will be the bound application, if present. """

        app = self._get_app(app)

        @app.route(rule)
        def ping():
            return '', status_code