docstr: Resolves the file path relative to the root log directory.
  
  Args:
      root_log_dir: Root log directory.
      filename: File path relative to the root log directory.
  
  Raises:
      FileNotFoundError: If the file path is invalid.
  
  Returns:
      The absolute file path resolved from the root log directory.
docstr_tok: ["Resolves","the","file","path","relative","to","the","root","log","directory",".","Args",":","root_log_dir",":","Root","log","directory",".","filename",":","File","path","relative","to","the","root","log","directory",".","Raises",":","FileNotFoundError",":","If","the","file","path","is","invalid",".","Returns",":","The","absolute","file","path","resolved","from","the","root","log","directory","."]
code: def _resolve_filename(cls, root_log_dir: Path, filename: str) -> Path:
      """
      Resolves the file path relative to the root log directory.
  
      Args:
          root_log_dir: Root log directory.
          filename: File path relative to the root log directory.
  
      Raises:
          FileNotFoundError: If the file path is invalid.
  
      Returns:
          The absolute file path resolved from the root log directory.
      """
      if not Path(filename).is_absolute():
          filepath = root_log_dir / filename
      else:
          filepath = Path(filename)
  
      # We want to allow relative paths that include symlinks pointing outside of the
      # `root_log_dir`, so use `os.path.abspath` instead of `Path.resolve()` because
      # `os.path.abspath` does not resolve symlinks.
      filepath = Path(os.path.abspath(filepath))
  
      if not filepath.is_file():
          raise FileNotFoundError(f"A file is not found at: {filepath}")
  
      try:
          filepath.relative_to(root_log_dir)
      except ValueError as e:
          raise FileNotFoundError(
              f"{filepath} not in {root_log_dir}: {e}"
          )
  
      # Fully resolve the path before returning (including following symlinks).
      return filepath.resolve()
  
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 4 for calling the LogAgentV1Grpc obj's underlying member method code with example usage: obj._resolve_filename(cls, root_log_dir, filename) and returns: filepath