code: def _generate_random_examples(
      rng: np.random.Generator,
      num_markers: int = 3,
      num_sessions_min: int = 2,
      num_sessions_max: int = 10,
  ) -> Tuple[List[PerMarkerResults], PerMarkerCollectedNumbers]:
      """Generates a random number of random marker extraction results for some markers.
  
      Args:
          rng: a random number generator
          num_markers: the number of markers to be imitated
      Returns:
          a list containing a dictionary of the marker extraction results per marker,
          as well as a collection of the plain list of numbers used as "preceding user
          turns" in that extraction results
      """
      num_sessions = int(
          rng.integers(low=num_sessions_min, high=num_sessions_max + 1)
      )
      markers = [f"marker{idx}" for idx in range(num_markers)]
      per_session_results: List[PerMarkerResults] = []
      preceding_user_turn_numbers_used_per_marker: PerMarkerCollectedNumbers = {
          marker: [] for marker in markers
      }
      for _ in range(num_sessions - 1):  # we append one more later
          result_dict = {}
          for marker in markers:
              (
                  event_list,
                  num_list,
              ) = _generate_random_example_for_one_session_and_one_marker(
                  rng=rng
              )
              result_dict[marker] = event_list
              preceding_user_turn_numbers_used_per_marker[
                  marker
              ].append(num_list)
          per_session_results.append(result_dict)
      # append a session where we didn't find any marker
      per_session_results.append({marker: [] for marker in markers})
      for marker in preceding_user_turn_numbers_used_per_marker:
          preceding_user_turn_numbers_used_per_marker[marker].append([])
      return (
          per_session_results,
          preceding_user_turn_numbers_used_per_marker,
      )
  
file_path: rasa/tests/core/evaluation/test_marker_stats.py
imports: import csv
  from pathlib import Path
  from typing import Dict, List, Text, Tuple
  import itertools
  import pytest
  import numpy
  from rasa.core.evaluation.marker_stats import EventMetaData, MarkerStatistics, compute_statistics
label_desc: Use image node_id 4 for calling a global function with example usage: _generate_random_examples(rng, num_markers, num_sessions_min, num_sessions_max) and returns: per_session_results,  preceding_user_turn_numbers_used_per_marker