<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_foreign_key_referential_action_sql(self, action):
 """ Returns the given referential action in uppercase if valid, otherwise throws an exception. :param action: The action :type action: str :rtype: str """

        action = action.upper()
        if action not in [
            "CASCADE",
            "SET NULL",
            "NO ACTION",
            "RESTRICT",
            "SET DEFAULT",
        ]:
            raise DBALException("Invalid foreign key action: %s" % action)

        return action