def get_source_addresses(api_client, filter):
    """
    Call the siem/source_addresses endpoint with the provided filter. Returns
    the list of source addresses or None if there was an error.
    """

    endpoint = 'siem/source_addresses'
    params = {'filter': filter}

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

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

        print("Failed to get source addresses.")
        print(response_body)
        return None

    source_addresses = json.loads(response_body)

    return source_addresses
dataset/ETHPy150Open ibm-security-intelligence/api-samples/siem/08_GetOffenseAddresses.py/get_source_addresses/swapped operands of `<`