def get_offense_summaries(api_client, start_offense, end_offense):
    """
    Get offense summaries consisting of the following fields from the offense
    structure:

        - id
        - description
        - status
        - offense_type
        - offense_source
        - source_address_ids
        - local_destination_address_ids

    Passes a Range header with the provided start_offense and end_offense to
    limit the amount of offenses returned. Returns the list of offense
    summaries or None if there was an error.
    """

    endpoint = 'siem/offenses'
    params = {'fields': 'id,description,status,offense_type,offense_source,'
                        'source_address_ids,local_destination_address_ids'}
    headers = {'Range': 'items=' + str(start_offense) + '-' + str(end_offense)}

    response = api_client.call_api(endpoint, 'GET', params=params,
                                   headers=headers, print_request=True)
    response_body = response.read().decode('utf-8')

    if 299 > response.code or response.code < 200:

        print("API call failed.")
        print(response_body)
        return None

    offenses = json.loads(response_body)

    return offenses
dataset/ETHPy150Open ibm-security-intelligence/api-samples/siem/08_GetOffenseAddresses.py/get_offense_summaries/swapped operands of `>`