code: def _add_logging_args(parser):
      group = parser.add_argument_group(title="logging")
  
      group.add_argument(
          "--log-params-norm",
          action="store_true",
          help="If set, calculate and log parameters norm.",
      )
      group.add_argument(
          "--log-num-zeros-in-grad",
          action="store_true",
          help="If set, calculate and log the number of zeros in gradient.",
      )
      group.add_argument(
          "--tensorboard-log-interval",
          type=int,
          default=1,
          help="Report to tensorboard interval.",
      )
      group.add_argument(
          "--tensorboard-queue-size",
          type=int,
          default=1000,
          help="Size of the tensorboard queue for pending events "
          "and summaries before one of the ‘add’ calls forces a "
          "flush to disk.",
      )
      group.add_argument(
          "--log-timers-to-tensorboard",
          action="store_true",
          help="If set, write timers to tensorboard.",
      )
      group.add_argument(
          "--log-batch-size-to-tensorboard",
          action="store_true",
          help="If set, write batch-size to tensorboard.",
      )
      group.add_argument(
          "--no-log-learnig-rate-to-tensorboard",
          action="store_false",
          help="Disable learning rate logging to tensorboard.",
          dest="log_learning_rate_to_tensorboard",
      )
      group.add_argument(
          "--no-log-loss-scale-to-tensorboard",
          action="store_false",
          help="Disable loss-scale logging to tensorboard.",
          dest="log_loss_scale_to_tensorboard",
      )
      group.add_argument(
          "--log-validation-ppl-to-tensorboard",
          action="store_true",
          help="If set, write validation perplexity to " "tensorboard.",
      )
      group.add_argument(
          "--log-memory-to-tensorboard",
          action="store_true",
          help="Enable memory logging to tensorboard.",
      )
      group.add_argument(
          "--log-world-size-to-tensorboard",
          action="store_true",
          help="Enable world size logging to tensorboard.",
      )
  
      return parser
  
imports: import argparse
  import os
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: _add_logging_args(parser) and returns: parser