code: def logging_directory():
      """Default logging directory for testing `<reporoot>/logdir`.
      The folder is deleted if it exists at the beginning of testing,
      it will not be deleted at the end of the tests to help debugging.
  
      """
      base_repo = os.path.dirname(os.path.abspath(orion.core.__file__))
      logdir = os.path.abspath(
          os.path.join(base_repo, "..", "..", "..", "logdir")
      )
      shutil.rmtree(logdir, ignore_errors=True)
      return logdir
  
imports: import os
  import shutil
  import subprocess
  import sys
  import tempfile
  from collections import defaultdict
  from contextlib import contextmanager
  import numpy
  import pytest
  import yaml
  import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.core.cli.hunt import workon
  from orion.testing import OrionState
label_desc: Use image node_id 8 for calling a global function with example usage: logging_directory() and returns: logdir