<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_data_or_404(model, instance_id, kind=''):
 """Wrap `get_data`, when missing data, raise BadRequest. """

    data = get_data(model, instance_id, kind)

    if not data:
        return abort(404)

    return data