def make_response(request, code, data=None):
    """Make response based on passed request, status code and data."""
    return {
        'action': request.get('action'),
        'time': request.get('time'),
        'data': data,
        'code': code,
    }