code: def results_base_path(resources_path):
      path = resources_path / "results"
      try:
          yield path
      finally:
          for p in reversed(list(path.rglob("*"))):
              if p.is_file():
                  p.unlink()
              else:
                  p.rmdir()
          if path.is_dir():
              path.rmdir()
  
file_path: flair/tests/conftest.py
imports: from pathlib import Path
  import pytest
  import torch
  import flair
label_desc: Use image node_id 3 for calling a global function with example usage: results_base_path(resources_path) without return types