def send(self, event, **kwargs):
        if 'name' not in kwargs:
            raise ValueError('Name and/or data missing.')
        ops = {
            'create': self._create_user,
            'edit': self._edit_user,
            'read': self._read_user,
            'delete': self._delete_user,
        }
        try:
            return ops[event](**kwargs)
        except KeyError:
            raise InvalidEvent
dataset/ETHPy150Open christabor/MoAL/MOAL/software_engineering/problem_solving/design_patterns/grasp/pattern_controller.py/CustomerController.send/original