def METHOD_NAME(cls, challenge):
    """
    This method is used to delete the resources used by a challenge.
    :param challenge:
    :return:
    """
    Fails.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    Solves.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    Flags.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    files = ChallengeFiles.query.filter_by(challenge_id=challenge.id).all()
    for f in files:
        delete_file(f.id)
    ChallengeFiles.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    Tags.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    Hints.query.filter_by(challenge_id=challenge.id).METHOD_NAME()
    Challenges.query.filter_by(id=challenge.id).METHOD_NAME()
    cls.challenge_model.query.filter_by(id=challenge.id).METHOD_NAME()
    db.session.commit()