class_docstr: Renders customizable statistics on top of event logs.
  
  This renderer provides a central rendering functionality for event log data. Elementary customizability
  is offered (e.g. simple aggregation etc.). For more complex operations with the data, it is advised
  to work with the TSV event logs directly.
class_docstr_tok: ["Renders","customizable","statistics","on","top","of","event","logs",".","This","renderer","provides","a","central","rendering","functionality","for","event","log","data",".","Elementary","customizability","is","offered","(","e.g",".","simple","aggregation","etc.",")",".","For","more","complex","operations","with","the","data",",","it","is","advised","to","work","with","the","TSV","event","logs","directly","."]
docstr: Converts camel-case and snake-case strings into capitalised space-separated ones.
docstr_tok: ["Converts","camel-case","and","snake-case","strings","into","capitalised","space-separated","ones","."]
code: def _humanize(string: str):
      """Converts camel-case and snake-case strings into capitalised space-separated ones."""
      # Snake case -> spaces
      string = string.replace("_", " ")
      # CamelCase -> spaces
      string = re.sub(r"(?<!^)(?=[A-Z])", " ", string)
      # Capital first letter
      string = string.lower().capitalize()
      # Special case: Detect ID, as it is rather common (in step ID)
      string = re.sub(r"(?<= )id(?=$| )", "ID", string)
      return string
  
file_path: maze/maze/core/rendering/events_stats_renderer.py
imports: import re
  from typing import Optional, Callable, Union
  import matplotlib.pyplot
  import pandas
  import seaborn
  from maze.core.log_events.episode_event_log import EpisodeEventLog
label_desc: Use image node_id 5 for calling the EventStatsRenderer obj's underlying member method code with example usage: obj._humanize(string) and returns: string