nodes: 0, module; 1, function_definition; 2, function_name:exists_case_sensitive; 3, parameters; 4, block; 5, identifier:path; 6, expression_statement; 7, expression_statement; 8, if_statement; 9, return_statement; 10, comment:"""
      Returns if the given path exists and also matches the case on Windows.
  
      When finding files that can be imported, it is important for the cases to match because while
      file os.path.exists("module.py") and os.path.exists("MODULE.py") both return True on Windows, Python
      can only import using the case of the real file.
      """; 11, assignment; 12, boolean_operator; 13, block; 14, identifier:result; 15, identifier:result; 16, call; 17, call; 18, identifier:result; 19, expression_statement; 20, expression_statement; 21, attribute; 22, argument_list; 23, attribute; 24, argument_list; 25, assignment; 26, assignment; 27, attribute; 28, identifier:exists; 29, identifier:path; 30, attribute; 31, identifier:startswith; 32, string; 33, pattern_list; 34, call; 35, identifier:result; 36, comparison_operator:basename in os.listdir(directory); 37, identifier:os; 38, identifier:path; 39, identifier:sys; 40, identifier:platform; 41, string_content:win; 42, identifier:directory; 43, identifier:basename; 44, attribute; 45, argument_list; 46, identifier:basename; 47, call; 48, attribute; 49, identifier:split; 50, identifier:path; 51, attribute; 52, argument_list; 53, identifier:os; 54, identifier:path; 55, identifier:os; 56, identifier:listdir; 57, identifier:directory
code: def exists_case_sensitive(path):
      """
      Returns if the given path exists and also matches the case on Windows.
  
      When finding files that can be imported, it is important for the cases to match because while
      file os.path.exists("module.py") and os.path.exists("MODULE.py") both return True on Windows, Python
      can only import using the case of the real file.
      """
      result = os.path.exists(path)
      if sys.platform.startswith('win') and result:
          directory, basename = os.path.split(path)
          result = basename in os.listdir(directory)
      return result