code: def create_directories(dir_path: str, is_master_node: bool) -> None:
      """Helper function to create directories"""
      if not os.path.isdir(dir_path):
          os.makedirs(dir_path, exist_ok=True)
          if is_master_node:
              logger.log("Directory created at: {}".format(dir_path))
      else:
          if is_master_node:
              logger.log("Directory exists at: {}".format(dir_path))
  
file_path: ml-cvnets/utils/common_utils.py
imports: import os
  import random
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import torch
  from packaging import version
  from torch import Tensor
  from common import MIN_TORCH_VERSION
  from utils import logger
  from utils.ddp_utils import is_master
label_desc: Use image node_id 5 for calling a global function with example usage: create_directories(dir_path, is_master_node) without return types