code: def find_end_offset_file(file: io.BufferedIOBase) -> int:
      """
      Find the offset of the end of a file without changing the file pointer.
  
      Args:
          file: File object
  
      Returns:
          Offset of the end of a file.
      """
      old_pos = file.tell()  # store old position
      file.seek(0, io.SEEK_END)  # move file pointer to end of file
      end = file.tell()  # return end of file offset
      file.seek(old_pos, io.SEEK_SET)
      return end
  
imports: import logging
  from typing import Optional, Tuple
  import concurrent.futures
  import ray.dashboard.modules.log.log_utils
  import ray.dashboard.modules.log.log_consts
  import ray.dashboard.utils
  import ray.dashboard.optional_utils
  from ray._private.ray_constants import env_integer
  import asyncio
  import grpc
  import io
  import os
  from pathlib import Path
  from ray.core.generated import reporter_pb2
  from ray.core.generated import reporter_pb2_grpc
  from ray._private.ray_constants import LOG_PREFIX_TASK_ATTEMPT_START, LOG_PREFIX_TASK_ATTEMPT_END
label_desc: Use image node_id 2 for calling a global function with example usage: find_end_offset_file(file) and returns: end