def get_request_ids_from_incidents(self, incident_status=['new', 'showed', 'normal', 'incident', 'viewed'], relevant_anomalous_metrics=None, max_incident_creation_timestamp=None):
    filter_dict = {'incident_status': {'$in': incident_status}}
    if (relevant_anomalous_metrics is not None):
        filter_dict['anomalous_metric'] = {'$in': relevant_anomalous_metrics}
    if (max_incident_creation_timestamp is not None):
        filter_dict['incident_creation_timestamp'] = {'$lte': max_incident_creation_timestamp}
    incident_collection = self._get_incident_collection()
    request_ids = [doc['_id'] for doc in incident_collection.aggregate([{'$match': filter_dict}, {'$group': {'_id': '$request_ids'}}], allowDiskUse=True)]
    return request_ids
def get_request_ids_from_incidents(self, incident_status=['new', 'showed', 'normal', 'incident', 'viewed'], relevant_anomalous_metrics=None, max_incident_creation_timestamp=None):
    filter_dict = {'incident_status': {'$in': incident_status}}
    if (relevant_anomalous_metrics is not None):
        filter_dict['anomalous_metric'] = {'$in': relevant_anomalous_metrics}
    if (max_incident_creation_timestamp is not None):
        filter_dict['incident_creation_timestamp'] = {'$lte': max_incident_creation_timestamp}
    incident_collection = self._get_incident_collection()
    request_ids = [doc['_id'] for doc in incident_collection.aggregate([{'$match': filter_dict}, {'$group': {'_id': '$request_ids'}}], allowDiskUse=True)]
    return request_ids