code: def find_parent_dir_containing(
      target: str, max_up: int = 6, initial_dir: str = os.getcwd()
  ) -> str:
      cur = initial_dir
      while (
          not os.path.exists(os.path.join(cur, target)) and max_up > 0
      ):
          cur = os.path.relpath(os.path.join(cur, ".."))
          max_up = max_up - 1
      if max_up == 0:
          raise OSError(
              f"Could not find {target} in parents of {os.getcwd()}"
          )
      return cur
  
imports: import copy
  import logging
  import os
  import re
  import shutil
  import string
  import subprocess
  import sys
  import tempfile
  from contextlib import contextmanager
  from difflib import unified_diff
  from pathlib import Path
  from subprocess import PIPE, Popen
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
  from omegaconf import Container, DictConfig, OmegaConf
  from hydra._internal.hydra import Hydra
  from hydra._internal.utils import detect_task_name
  from hydra.core.global_hydra import GlobalHydra
  from hydra.core.utils import JobReturn, validate_config_path
  from hydra.types import TaskFunction
label_desc: Use image node_id 5 for calling a global function with example usage: find_parent_dir_containing(target, max_up, initial_dir) and returns: cur