class_docstr: An adapter to assist with logging in multiprocess.
  
  `log` takes in an additional `main_process_only` kwarg, which dictates whether it should be called on all processes
  or only the main executed one. Default is `main_process_only=True`.
  
  Does not require an `Accelerator` object to be created first.
docstr: Check if log should be performed
code: def _should_log(main_process_only):
      "Check if log should be performed"
      state = PartialState()
      return not main_process_only or (
          main_process_only and state.is_main_process
      )
  
file_path: accelerate/src/accelerate/logging.py
imports: import functools
  import logging
  import os
  from .state import PartialState
label_desc: Use image node_id 1 for calling the MultiProcessAdapter obj's underlying member method code with example usage: obj._should_log(main_process_only) and returns: unknown