def get_last_polled_triage_items(self, triage_ids, state_serializer_obj):
        """ 
            gets the last triage items list, if the file is not there then create a file
            and upload new triage items if file is already there then return the triage item list    
        """
        existing_triage_id = set()
        existing_triage_id_str = state_serializer_obj.get_triage_items()

        try:
            if existing_triage_id_str:
                existing_triage_id = set(existing_triage_id_str.splitlines())

            logger.info('existing triage items length : {}'.format(len(existing_triage_id)))

            new_triage_id = set(triage_ids)
            unique_triage_id = existing_triage_id.union(new_triage_id)
            unique_triage_id_list = list(unique_triage_id)
            num_items = len(unique_triage_id_list)
            logger.info('unique triage list length: {}'.format(num_items))


            # Determine how many items to return
            id = unique_triage_id_list[:150]
            state_serializer_obj.post_triage_items('\n'.join(unique_triage_id_list[150:]))
            return id
        
        except Exception as e:
            logger.info("An error occurred while getting the last polled triage items: {}".format(e))
            return None
 
            gets the last triage items list, if the file is not there then create a file
            and upload new triage items if file is already there then return the triage item list    
        
Solutions/Digital Shadows/Data Connectors/Digital Shadows/DigitalShadowsConnectorAzureFunction/DS_poller.py