code: def should_log(record):
      return PartialState().is_main_process
  
imports: import sys
  from accelerate.state import PartialState
  from loguru import logger
label_desc: Use image node_id 1 for calling a global function with example usage: should_log(record) and returns: PartialState