code: def get_last_lines_of_file(
      file_name: str, num_lines: int = 2
  ) -> tuple[list[str], list[str]]:
      """
      Get last lines of a file efficiently, without reading the whole file (with some limitations).
      Assumptions ara that line length not bigger than ~180 chars.
  
      :param file_name: name of the file
      :param num_lines: number of lines to return (max)
      :return: Tuple - last lines of the file in two variants: original and with removed ansi colours
      """
      # account for EOL
      max_read = (180 + 2) * num_lines
      try:
          seek_size = min(os.stat(file_name).st_size, max_read)
      except FileNotFoundError:
          return [], []
      with open(file_name, "rb") as temp_f:
          temp_f.seek(-seek_size, os.SEEK_END)
          tail = temp_f.read().decode(errors="ignore")
      last_lines = tail.splitlines()[-num_lines:]
      last_lines_no_colors = [
          remove_ansi_colours(line) for line in last_lines
      ]
      return last_lines, last_lines_no_colors
  
imports: from __future__ import annotations
  import datetime
  import os
  import re
  import sys
  import textwrap
  import time
  from abc import ABCMeta, abstractmethod
  from contextlib import contextmanager
  from enum import Enum
  from multiprocessing.pool import ApplyResult, Pool
  from pathlib import Path
  from tempfile import NamedTemporaryFile
  from threading import Thread
  from typing import Any, Generator, NamedTuple
  from rich.table import Table
  from airflow_breeze.utils.console import MessageType, Output, get_console
  from airflow_breeze.utils.shared_options import get_dry_run, get_forced_answer, get_verbose, set_dry_run, set_forced_answer, set_verbose
label_desc: Use image node_id 7 for calling a global function with example usage: get_last_lines_of_file(file_name, num_lines) and returns: last_lines,  last_lines_no_colors, list,  list