<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_advanced_foreign_key_options_sql(self, foreign_key):
 """ Returns the FOREIGN KEY query section dealing with non-standard options :param foreign_key: The foreign key :type foreign_key: ForeignKeyConstraint :rtype: str """

        query = ""
        if self.supports_foreign_key_on_update() and foreign_key.has_option(
            "on_update"
        ):
            query += " ON UPDATE %s" % self.get_foreign_key_referential_action_sql(
                foreign_key.get_option("on_update")
            )

        if foreign_key.has_option("on_delete"):
            query += " ON DELETE %s" % self.get_foreign_key_referential_action_sql(
                foreign_key.get_option("on_delete")
            )

        return query