<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def capture_heroku_database(self):
 """ Capture Heroku database backup. """

        self.print_message("Capturing database backup for app '%s'" % self.args.source_app)
        args = [
            "heroku",
            "pg:backups:capture",
            "--app=%s" % self.args.source_app,
        ]
        if self.args.use_pgbackups:
            args = [
                "heroku",
                "pgbackups:capture",
                "--app=%s" % self.args.source_app,
                "--expire",
            ]
        subprocess.check_call(args)