code: def suppress_output(is_main):
      """Suppress printing on the current device. Force printing with `force=True`."""
      import builtins as __builtin__
  
      builtin_print = __builtin__.print
  
      def print(*args, **kwargs):
          force = kwargs.pop("force", False)
          if is_main or force:
              builtin_print(*args, **kwargs)
  
      __builtin__.print = print
  
      import warnings
  
      builtin_warn = warnings.warn
  
      def warn(*args, **kwargs):
          force = kwargs.pop("force", False)
          if is_main or force:
              builtin_warn(*args, **kwargs)
  
      # Log warnings only once
      warnings.warn = warn
      warnings.simplefilter("once", UserWarning)
  
imports: import contextlib
  import logging
  import os
  import pickle
  import socket
  import subprocess
  import warnings
  from itertools import chain
  import torch
  from mmf.common.registry import registry
  from torch import distributed
label_desc: Use image node_id 19 for calling a global function with example usage: suppress_output(is_main) without return types