code: def convert_sync_batchnorm(model, device):
      # Convert bn to sync_bn when use multi GPUs
      env_info = get_sys_env()
      if (
          device == "gpu"
          and env_info["Paddle compiled with cuda"]
          and env_info["GPUs used"]
          and paddle.distributed.ParallelEnv().nranks > 1
      ):
          model = paddle.nn.SyncBatchNorm.convert_sync_batchnorm(model)
          logger.info("Convert bn to sync_bn")
      return model
  
imports: import os
  import contextlib
  import tempfile
  import random
  from urllib.parse import urlparse, unquote
  import yaml
  import numpy
  import paddle
  import cv2
  from paddleseg.utils import logger, seg_env, get_sys_env
  from paddleseg.utils.download import download_file_and_uncompress
label_desc: Use image node_id 5 for calling a global function with example usage: convert_sync_batchnorm(model, device) and returns: model