def METHOD_NAME(self, broker, pipe_target):
    """Get the ids of all the following messages in the pipeline which have store_results"""
    from ..message import Message
    message_ids: Set[str] = set()
    if isinstance(pipe_target, list):
        for message_data in pipe_target:
            message_ids |= self.METHOD_NAME(broker, message_data)
    elif pipe_target:
        message = Message(**pipe_target)
        if self.get_option("store_results", broker=broker, message=message):
            message_ids.add(message.message_id)
        message_ids |= self.METHOD_NAME(
            broker, self.get_option("pipe_target", broker=broker, message=message)
        )
    return message_ids