code: def _get_parent_paths_check(path: str, sep: str, asep: str) -> None:
      """A little helper for get_parent_paths"""
      if (
          isabs(path)
          or path.startswith(pardir + sep)
          or path.startswith(curdir + sep)
      ):
          raise ValueError(
              "Expected relative within directory paths, got %r" % path
          )
      if sep + sep in path:
          raise ValueError(
              f"Expected normalized paths, got {path} containing '{sep+sep}'"
          )
      if asep in path:
          raise ValueError(
              f"Expected paths with {sep} as separator, got {path} containing '{asep}'"
          )
  
file_path: datalad/datalad/support/path.py
imports: from __future__ import annotations
  import os
  import os.path
  from collections import defaultdict
  from collections.abc import Iterable, Iterator
  from functools import wraps
  from itertools import dropwhile
  from pathlib import Path, PurePosixPath
  from ..utils import ensure_bytes, getpwd
label_desc: Use image node_id 6 for calling a global function with example usage: _get_parent_paths_check(path, sep, asep) without return types