code: def test_overall_statistics_to_csv(tmp_path: Path, seed: int):
      rng = np.random.default_rng(seed=seed)
      (
          per_session_results,
          preceding_user_turn_numbers_used_per_marker,
      ) = _generate_random_examples(
          num_markers=3,
          rng=rng,
          num_sessions_min=10,
          num_sessions_max=20,
      )
      markers = sorted(
          preceding_user_turn_numbers_used_per_marker.keys()
      )
      num_sessions = len(per_session_results)
  
      stats = MarkerStatistics()
      for session_idx, results in enumerate(per_session_results):
          stats.process(
              session_idx=session_idx,
              sender_id=str(rng.choice(100)),
              meta_data_on_relevant_events_per_marker=results,
          )
  
      tmp_file = tmp_path / "test.csv"
      stats.overall_statistic_to_csv(path=tmp_file)
  
      with tmp_file.open(mode="r") as f:
          reader = csv.DictReader(f)
          rows = [row for row in reader]
  
      assert rows[0] == {
          "sender_id": "all",
          "session_idx": "nan",
          "marker": "-",
          "statistic": "total_number_of_sessions",
          "value": str(num_sessions),
      }
  
      num_digits = 3
      row_idx = 1
      for marker_name in markers:
          assert rows[row_idx] == {
              "sender_id": "all",
              "session_idx": "nan",
              "marker": marker_name,
              "statistic": "number_of_sessions_where_marker_applied_at_least_once",
              "value": str(
                  stats.count_if_applied_at_least_once[marker_name]
              ),
          }
          row_idx += 1
          assert rows[row_idx] == {
              "sender_id": "all",
              "session_idx": "nan",
              "marker": marker_name,
              "statistic": "percentage_of_sessions_where_marker_applied_at_least_once",
              "value": str(
                  round(
                      stats.count_if_applied_at_least_once[marker_name]
                      / num_sessions
                      * 100,
                      num_digits,
                  )
              ),
          }
          row_idx += 1
  
      for marker_name in markers:
          statistics = compute_statistics(
              stats.num_preceding_user_turns_collected[marker_name]
          )
          for stat_name, stat_value in statistics.items():
              assert rows[row_idx] == {
                  "sender_id": "all",
                  "session_idx": "nan",
                  "marker": marker_name,
                  "statistic": MarkerStatistics._add_num_user_turns_str_to(
                      stat_name
                  ),
                  "value": str(round(stat_value, num_digits)),
              }
              row_idx += 1
  
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 7 for calling a global function with example usage: test_overall_statistics_to_csv(tmp_path, seed) without return types