code: def get_rank_if_horovod_process_else_return_zero() -> Optional[int]:
      return int(os.getenv("HOROVOD_RANK", 0))
  
file_path: determined/harness/determined/tensorboard/build.py
imports: import os
  import pathlib
  import urllib
  from typing import Any, Dict, Optional, Union
  from determined.common.storage.shared import _full_storage_path
  from determined.tensorboard import azure, base, directory, gcs, s3, shared
label_desc: Use image node_id 3 for calling a global function with example usage: get_rank_if_horovod_process_else_return_zero() and returns: int