code: def rel_include_warnings(
      dir, src, line_num, inc_file, top_inc_dirs
  ) -> typing.List[Issue]:
      warn: typing.List[Issue] = []
      inc_folders = inc_file.split(os.path.sep)[:-1]
      inc_folders_alt = inc_file.split(os.path.altsep)[:-1]
  
      if len(inc_folders) != 0 and len(inc_folders_alt) != 0:
          w = "using %s and %s as path separators" % (
              os.path.sep,
              os.path.altsep,
          )
          warn.append(Issue(False, w, src, line_num))
  
      if len(inc_folders) == 0:
          inc_folders = inc_folders_alt
  
      abs_inc_folders = [
          os.path.abspath(os.path.join(dir, *inc_folders[: i + 1]))
          for i in range(len(inc_folders))
      ]
  
      if os.path.curdir in inc_folders:
          w = "rel include containing reference to current folder '{}'".format(
              os.path.curdir
          )
          warn.append(Issue(False, w, src, line_num))
  
      if any(
          any([os.path.basename(p) == f for f in top_inc_dirs])
          for p in abs_inc_folders
      ):
          w = "rel include going over %s folders" % (
              "/".join("'" + f + "'" for f in top_inc_dirs)
          )
  
          warn.append(Issue(False, w, src, line_num))
  
      if (
          len(inc_folders) >= 3
          and os.path.pardir in inc_folders
          and any(p != os.path.pardir for p in inc_folders)
      ):
          w = (
              "rel include with more than "
              "2 folders that aren't in a straight heritage line"
          )
          warn.append(Issue(False, w, src, line_num))
  
      return warn
  
file_path: cuml/cpp/scripts/include_checker.py
imports: from __future__ import print_function
  import sys
  import re
  import os
  import argparse
  import io
  from functools import reduce
  import operator
  import dataclasses
  import typing
label_desc: Use image node_id 6 for calling a global function with example usage: rel_include_warnings(dir, src, line_num, inc_file, top_inc_dirs) and returns: warn