code: def get_callbacks(self, args):
      callbacks = []
  
      if args.log_to_tensorboard:
          logdir = os.path.join(
              args.output_path,
              "tb_logs/",
              datetime.now().strftime("%Y%m%d-%H%M%S"),
          )
          tensorboard_callback = tf.keras.callbacks.TensorBoard(
              log_dir=logdir,
              update_freq=args.metrics_log_frequency,
              write_steps_per_second=True,
          )
          callbacks.append(tensorboard_callback)
  
      wandb_callback = None
      if args.log_to_wandb:
          wandb_callback = self.logger.get_callback(
              metrics_log_frequency=args.metrics_log_frequency,
              save_model=False,
              save_graph=False,
          )
          callbacks.append(wandb_callback)
  
      callbacks.append(
          [
              ExamplesPerSecondCallback(
                  args.train_batch_size,
                  every_n_steps=args.metrics_log_frequency,
                  logger=self.logger,
                  log_to_console=True,
              )
          ]
      )
  
      return callbacks
  
imports: import json
  import logging
  import os
  from datetime import datetime
  import merlin.models.tf
  import numpy
  import tensorflow
  from merlin.io.dataset import Dataset
  from merlin.models.tf.logging.callbacks import ExamplesPerSecondCallback, WandbLogger
  from merlin.models.tf.transforms.negative_sampling import InBatchNegatives
  from merlin.schema.tags import Tags
  from .args_parsing import Task, parse_arguments
  from .mtl import get_mtl_loss_weights, get_mtl_prediction_tasks
  from .ranking_models import get_model
label_desc: Use image node_id 18 for calling the RankingTrainEvalRunner obj's underlying member method code with example usage: obj.get_callbacks(args) and returns: callbacks