class_docstr: HDD results.
class_docstr_tok: ["HDD","results","."]
docstr: Validate paths.
docstr_tok: ["Validate","paths","."]
code: def _validate_path(path):
      """Validate paths."""
      # check if path already exists
      if os.path.exists(path):
          if not os.path.isdir(path):
              raise ValueError(
                  "path already exists and is not a directory"
              )
  
          elif os.path.isfile(os.path.join(path, "results.pickle")):
              warn(
                  f"Existing results file found in given path: {path}. "
                  f"Results file will be updated"
              )
  
          elif (
              len(
                  [
                      file
                      for file in os.listdir(path)
                      if not file.startswith(".")
                  ]
              )
              > 0
          ):
              warn("path already exists and is not empty")
  
imports: import os
  from abc import ABC, abstractmethod
  from warnings import warn
  import numpy
  from joblib import dump, load
label_desc: Use image node_id 4 for calling the HDDBaseResults obj's underlying member method code with example usage: obj._validate_path(path) without return types