def get_local_destination_addresses(api_client, filter):
    """
    Call the siem/local_destination_addresses endpoint with the provided
    filter. Returns the list of local destination addresses or None if there
    was an error.
    """

    endpoint = 'siem/local_destination_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 response.code < 200:

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

    local_destination_addresses = json.loads(response_body)

    return local_destination_addresses
dataset/ETHPy150Open ibm-security-intelligence/api-samples/siem/08_GetOffenseAddresses.py/get_local_destination_addresses/original