code: def dereference_symlinks(src):
      
      while os.path.islink(src):
          src = os.path.join(os.path.dirname(src), os.readlink(src))
  
      return src
docs: Resolve all symbolic references that `src` points to.  Note that this
      is different than `os.path.realpath` as path components leading up to
      the final location may still be symbolic links.