code: def test_main_logger_with_groups():
      """Test groups"""
      groups = {
          "acccuracy": ["acc", "val_acc"],
          "log-loss": ["loss", "val_loss"],
      }
      logger = MainLogger(groups=groups)
      logger.update(
          {"acc": 0.5, "val_acc": 0.4, "loss": 1.2, "val_loss": 1.1}
      )
      logger.update(
          {"acc": 0.55, "val_acc": 0.45, "loss": 1.1, "val_loss": 1.0}
      )
      logger.update(
          {"acc": 0.65, "val_acc": 0.55, "loss": 1.0, "val_loss": 0.9}
      )
      grouped_log_history = logger.grouped_log_history(
          raw_names=True, raw_group_names=True
      )
      assert len(grouped_log_history) == 2
      assert len(grouped_log_history["acccuracy"]) == 2
      assert len(grouped_log_history["acccuracy"]["val_acc"]) == 3
      assert len(grouped_log_history["log-loss"]["loss"]) == 3
      grouped_log_history = logger.grouped_log_history()
      assert len(grouped_log_history) == 2
      assert len(grouped_log_history["acccuracy"]) == 2
      assert len(grouped_log_history["acccuracy"]["validation"]) == 3
      assert len(grouped_log_history["log-loss"]["training"]) == 3
  
file_path: livelossplot/tests/test_main_logger.py
imports: import re
  from livelossplot import MainLogger
label_desc: Use image node_id 2 for calling a global function with example usage: test_main_logger_with_groups() without return types