<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_context_and_user_ids(self, context_name, user_name):
 """Helper to get the context ID and user ID from the given names."""

        if context_name is None:
            return None, None

        context_id = self.get_context_info(context_name)['id']
        user_id = None
        if user_name:
            user_id = self._get_user_id_from_name(context_id, user_name)

        return context_id, user_id