code: def get_ugali_dir():
      
  
      dirname = os.getenv('UGALIDIR')
  
      # Get the HOME directory
      if not dirname:
          dirname=os.path.join(os.getenv('HOME'),'.ugali')
  
      if not os.path.exists(dirname):
          from ugali.utils.logger import logger
          msg = "Creating UGALIDIR:\n%s"%dirname
          logger.warning(msg)
  
      return mkdir(dirname)
docs: Get the path to the ugali data directory from the environment