<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def result_or_error(response):
 """Get `result` field from Betfair response or raise exception if not found. :param Response response: :raises: ApiError if no results passed """

    data = response.json()
    result = data.get('result')
    if result is not None:
        return result
    raise exceptions.ApiError(response, data)