<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_rejection_reasons(self, keyword=None):
 """ Returns a list with the rejection reasons as strings :param keyword: set of rejection reasons to be retrieved. Possible values are: - 'selected': Get, amongst the set of predefined reasons, the ones selected - 'other': Get the user free-typed reason for rejection - None: Get all rejection reasons :return: list of rejection reasons as strings or an empty list """

        keys = ['selected', 'other']
        if keyword is None:
            return sum(map(self.get_rejection_reasons, keys), [])
        if keyword not in keys:
            return []
        rejection_reasons = self.context.getRejectionReasons()
        rejection_reasons = rejection_reasons and rejection_reasons[0] or {}
        if keyword == 'other':
            return rejection_reasons.get(keyword, '') and [rejection_reasons.get(keyword, '')] or []
        return rejection_reasons.get(keyword, [])