code: def test_main_logger_autogroups():
      """Test group patterns"""
      logger = MainLogger()
      logger.update(
          {
              "acc": 0.5,
              "val_acc": 0.4,
              "loss": 1.2,
              "val_loss": 1.1,
              "lr": 0.01,
          }
      )
      logger.update(
          {
              "acc": 0.55,
              "val_acc": 0.45,
              "loss": 1.1,
              "val_loss": 1.0,
              "lr": 0.001,
          }
      )
      logger.update(
          {
              "acc": 0.65,
              "val_acc": 0.55,
              "loss": 1.0,
              "val_loss": 0.9,
              "lr": 0.0001,
          }
      )
      grouped_log_history = logger.grouped_log_history()
      target_groups = {
          "Accuracy": ("validation", "training"),
          "Loss": ("validation", "training"),
          "lr": ("lr",),
      }
      for target_group, target_metrics in target_groups.items():
          for m1, m2 in zip(
              sorted(grouped_log_history[target_group].keys()),
              sorted(target_metrics),
          ):
              assert m1 == m2
  
file_path: livelossplot/tests/test_main_logger.py
imports: import re
  from livelossplot import MainLogger
label_desc: Use image node_id 5 for calling a global function with example usage: test_main_logger_autogroups() without return types