<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_main_for(self, model):
        '''
        Returns main image for given model
        '''        
        try:
            return self.for_model(model).get(is_main=True)
        except models.ObjectDoesNotExist:
            return None