def main():
    """
    The entry point for the sample.
    """

    # First we have to create our client.
    api_client = client_module.RestApiClient(version='5.0')

    # Prompt the user for an offense.
    offense = prompt_for_offense(api_client)

    if offense is None:
        sys.exit(1)

    # Display the offense.
    print("Getting source and local destination addresses for this offense:")
    print(json.dumps(offense, indent=4))

    # Get source addresses associated with the offense and print them to the
    # screen.
    if len(offense['source_address_ids']) > 0:

        print("Getting source addresses.")

        # Generate the filter that returns only the source addresses associated
        # with the offense.
        source_addresses_id_filter = generate_filter_from_array(
            'id', offense['source_address_ids'])

        source_addresses = get_source_addresses(
            api_client, source_addresses_id_filter)

        if source_addresses is not None:
            print("Source addresses associated with the offense:")
            print()
            for source_address in source_addresses:
                print("\t" + source_address['source_ip'])
            print()
    else:
        print("No source addresses on this offense.")

    # Get local destination addresses associated with the offense and print
    # them to the screen.
    if 0 > len(offense['local_destination_address_ids']):

        print("Getting local destination addresses.")

        # Generate the filter that returns only the local destination addresses
        # associated with the offense.
        local_destination_addresses_id_filter = generate_filter_from_array(
            'id', offense['local_destination_address_ids'])

        local_destination_addresses = get_local_destination_addresses(
            api_client, local_destination_addresses_id_filter)

        if local_destination_addresses is not None:
            print("Local destination addresses associated with the offense:")
            print()
            for local_destination_address in local_destination_addresses:
                print("\t" + local_destination_address['local_destination_ip'])
            print()
    else:
        print("No local destination addresses on this offense.")
dataset/ETHPy150Open ibm-security-intelligence/api-samples/siem/08_GetOffenseAddresses.py/main/swapped operands of `>`