<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_selected(self, model):
 """Checks whether the given model is selected :param model: :return: True if the model is within the selection, False else :rtype: bool """

        if model is None:
            return len(self._selected) == 0
        return model in self._selected