def has_department(self, department_id):

        def department_ids(department):
            return department.id

        return map(department_ids, self.departments) in department_id
dataset/ETHPy150Open codeforamerica/comport/comport/user/models.py/User.has_department/swapped operands of `in`