code: def _check_line_endings():
      """Check all files in the repository for CR characters"""
      if sys.platform == "win32":
          print("Skipping line endings check on Windows")
          sys.stdout.flush()
          return
      print("Running line endings check... ")
      sys.stdout.flush()
      report = []
      import_dir, dev = _get_import_dir()
      for dirpath, dirnames, filenames in os.walk(import_dir):
          for fname in filenames:
              if op.splitext(fname)[1] in (
                  ".pyc",
                  ".pyo",
                  ".so",
                  ".dll",
              ):
                  continue
              # Get filename
              filename = op.join(dirpath, fname)
              relfilename = op.relpath(filename, import_dir)
              # Open and check
              try:
                  with open(filename, "rb") as fid:
                      text = fid.read().decode("utf-8")
              except UnicodeDecodeError:
                  continue  # Probably a binary file
              crcount = text.count("\r")
              if crcount:
                  lfcount = text.count("\n")
                  report.append(
                      "In %s found %i/%i CR/LF"
                      % (relfilename, crcount, lfcount)
                  )
  
      # Process result
      if len(report) > 0:
          raise RuntimeError(
              "Found %s files with incorrect endings:\n%s"
              % (len(report), "\n".join(report))
          )
  
imports: from __future__ import print_function
  import sys
  import os
  import warnings
  from os import path
  from copy import deepcopy
  from functools import partial
  from ..util import use_log_level, run_subprocess
  from ..util.ptime import time
  from ._testing import has_application, nottest, IS_CI, IS_TRAVIS_CI
label_desc: Use image node_id 5 for calling a global function with example usage: _check_line_endings() without return types