code: def _hard_rmtree(path):
      # Sometimes rmtree doesn't work, for some reason, but moving the directory
      # to a temporary directory does.
      shutil.rmtree(path, ignore_errors=True)
      try:
          with tempfile.TemporaryDirectory() as trash_dir:
              shutil.move(str(path), trash_dir)
      except FileNotFoundError:
          pass
  
imports: import os
  import pathlib
  import shutil
  import subprocess
  import sys
  import tempfile
  import textwrap
  import pytest
  from garage.experiment.experiment import wrap_experiment
label_desc: Use image node_id 1 for calling a global function with example usage: _hard_rmtree(path) without return types