code: def contains_symlink_up_to(path: "StrPath", base_path: "StrPath"):
      from dvc.fs import system
  
      base_path = os.path.normcase(os.fspath(base_path))
      path = os.path.normcase(os.fspath(path))
  
      if base_path not in path:
          raise BasePathNotInCheckedPathException(path, base_path)
  
      if path == base_path:
          return False
      if system.is_symlink(path):
          return True
      if os.path.dirname(path) == path:
          return False
      return contains_symlink_up_to(os.path.dirname(path), base_path)
  
file_path: dvc/dvc/utils/fs.py
imports: import errno
  import os
  import shutil
  import stat
  import sys
  from typing import TYPE_CHECKING
  from dvc.exceptions import DvcException
  from dvc.log import logger
label_desc: Use image node_id 1 for calling a global function with example usage: contains_symlink_up_to(path, base_path) and returns: contains_symlink_up_to, False, True, False