code: def set_data_path(path):
      """
      Set the path for ART's data directory (ART_DATA_PATH).
      """
      expanded_path = os.path.abspath(os.path.expanduser(path))
      os.makedirs(expanded_path, exist_ok=True)
      if not os.access(expanded_path, os.R_OK):  # pragma: no cover
          raise OSError(f"path {expanded_path} cannot be read from")
      if not os.access(expanded_path, os.W_OK):  # pragma: no cover
          logger.warning("path %s is read only", expanded_path)
  
      global ART_DATA_PATH  # pylint: disable=W0603
      ART_DATA_PATH = expanded_path
      logger.info("set ART_DATA_PATH to %s", expanded_path)
  
imports: import json
  import logging
  import os
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: set_data_path(path) without return types