code: def register_log_stats_writer(writer: LogStatsWriter) -> None:
      """
      Set the concrete writer implementation that will receive all successive statistics logging.
  
      :param writer: The writer to be used by the logging system
      """
      GlobalLogState.global_log_stats_writers.append(writer)
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  from enum import Enum
  from typing import Union, Callable, Dict, Optional, NamedTuple, List, Type, TypeVar, Tuple, Any
  import numpy
  from maze.core.events.event_record import EventRecord
  from maze.core.events.event_topic_factory import event_topic_factory
label_desc: Use image node_id 1 for calling a global function with example usage: register_log_stats_writer(writer) without return types