class_docstr: Creates paths related to the slurm job and its submission
class_docstr_tok: ["Creates","paths","related","to","the","slurm","job","and","its","submission"]
docstr: Returns the closest folder which is id independent
docstr_tok: ["Returns","the","closest","folder","which","is","id","independent"]
code: def get_first_id_independent_folder(
      folder: tp.Union[Path, str]
  ) -> Path:
      """Returns the closest folder which is id independent"""
      parts = Path(folder).expanduser().absolute().parts
      tags = ["%j", "%t", "%A", "%a"]
      indep_parts = itertools.takewhile(
          lambda x: not any(tag in x for tag in tags), parts
      )
      return Path(*indep_parts)
  
imports: import contextlib
  import io
  import itertools
  import os
  import pickle
  import select
  import shutil
  import subprocess
  import sys
  import tarfile
  import typing
  from pathlib import Path
  import cloudpickle
label_desc: Use image node_id 10 for calling the JobPaths obj's underlying member method code with example usage: obj.get_first_id_independent_folder(folder) and returns: Path