code: def validate_lines_in_file(
      fileName,
      file_contents,
      CRLF=True,
      LTRB=True,
      withTranscription=False,
      withConfidence=False,
      imWidth=0,
      imHeight=0,
  ):
      """
      This function validates that all lines of the file calling the Line validation function for each line
      """
      utf8File = decode_utf8(file_contents)
      if utf8File is None:
          raise Exception("The file %s is not UTF-8" % fileName)
  
      lines = utf8File.split("\r\n" if CRLF else "\n")
      for line in lines:
          line = line.replace("\r", "").replace("\n", "")
          if line != "":
              try:
                  validate_tl_line(
                      line,
                      LTRB,
                      withTranscription,
                      withConfidence,
                      imWidth,
                      imHeight,
                  )
              except Exception as e:
                  raise Exception(
                      (
                          "Line in sample not valid. Sample: %s Line: %s Error: %s"
                          % (fileName, line, str(e))
                      ).encode("utf-8", "replace")
                  )
  
imports: import json
  import sys
  import zipfile
  import re
  import sys
  import os
  import codecs
  import traceback
  import numpy
  from utils import order_points_clockwise
label_desc: Use image node_id 6 for calling a global function with example usage: validate_lines_in_file(fileName, file_contents, CRLF, LTRB, withTranscription, withConfidence, imWidth, imHeight) without return types