'Get a case event type for an event code
@param code: the type code (using default event type if None)
@return: the dvr_case_event_type Row, or None if not found'

def get_event_type(self, code=None):

    event_types = self.get_event_types()
    event_type = None
    if (code is None):
        event_type = event_types.get('_default')
    else:
        code = s3_str(code)
        for value in event_types.values():
            if (value.code == code):
                event_type = value
                break
    return event_type
