input: Write a python function to check if a file should be included based on its extension and exclusion criteria.
  assert check_file('test.cpp', [], ['.cpp', '.h']) == True
  assert check_file('test.txt', [], ['.cpp', '.h']) == False
  assert check_file('exclude/test.cpp', ['exclude'], ['.cpp', '.h']) == False
output: def check_file(filename, exclude_dirs, include_exts):
      import os
      file_ext = os.path.splitext(filename)[1]
      if file_ext not in include_exts:
          return False
      for dir in exclude_dirs:
          if filename.startswith(dir):
              return False
      return True