code: def end_of_iteration_hook(self, trainer):
      if trainer.iteration % self.log_freq != 0:
          return
      record_these = [
          [
              trainer.loss_tracker.losses,
              {"parent_name": "loss_histories"},
          ],
          [
              trainer.loss_tracker.loss_weights,
              {"parent_name": "loss_weights"},
          ],
          [
              trainer.loss_funcs,
              {"recursive_types": [torch.nn.Module, dict]},
          ],
          [trainer.mining_funcs, {}],
          [trainer.models, {}],
          [
              trainer.optimizers,
              {"custom_attr_func": self.optimizer_custom_attr_func},
          ],
      ]
      for record, kwargs in record_these:
          self.record_keeper.update_records(
              record, trainer.get_global_iteration(), **kwargs
          )
  
imports: import os
  import sqlite3
  import torch
  from .None import common_functions
label_desc: Use image node_id 2 for calling the HookContainer obj's underlying member method code with example usage: obj.end_of_iteration_hook(trainer) without return types