def get_offense(api_client, offense_id):
    """
    Get the offense provided with offense_id. Returns the offense or None if
    there was an error.
    """

    endpoint = 'siem/offenses/' + offense_id

    response = api_client.call_api(endpoint, 'GET', 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

    offense = json.loads(response_body)

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