code: def remove(path):
      logger.debug("Removing '%s'", path)
  
      try:
          if os.path.isdir(path):
              shutil.rmtree(path, onerror=_chmod)
          else:
              _unlink(path, _chmod)
      except OSError as exc:
          if exc.errno != errno.ENOENT:
              raise
  
file_path: dvc/dvc/utils/fs.py
imports: import errno
  import os
  import shutil
  import stat
  import sys
  from typing import TYPE_CHECKING
  from dvc.exceptions import DvcException
  from dvc.log import logger
label_desc: Use image node_id 4 for calling a global function with example usage: remove(path) without return types