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