<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_controller_by_id(self, id):
 """Get the controller object given the id. This method returns the controller object for given id. :param id: id of the controller, for example 'Smart Array P822 in Slot 2' :returns: Controller object which has the id or None if the controller is not found. """

        for controller in self.controllers:
            if controller.id == id:
                return controller
        return None