code: def _find_dep_file_path(
      main_file, file_path, relative_path_search=False
  ):
      abs_path = os.path.abspath(file_path)
      if not os.path.exists(abs_path) and (
          file_path.endswith(".pxi") or relative_path_search
      ):
          # files are looked up relative to the main source file
          rel_file_path = os.path.join(
              os.path.dirname(main_file), file_path
          )
          if os.path.exists(rel_file_path):
              abs_path = os.path.abspath(rel_file_path)
      # search sys.path for external locations if a valid file hasn't been found
      if not os.path.exists(abs_path):
          for sys_path in sys.path:
              test_path = os.path.realpath(
                  os.path.join(sys_path, file_path)
              )
              if os.path.exists(test_path):
                  return canonical_filename(test_path)
      return canonical_filename(abs_path)
  
imports: from __future__ import absolute_import
  import re
  import os.path
  import sys
  from collections import defaultdict
  from coverage.plugin import CoveragePlugin, FileTracer, FileReporter
  from coverage.files import canonical_filename
  from .Utils import find_root_package_dir, is_package_dir, open_source_file
  from .None import __version__
label_desc: Use image node_id 2 for calling a global function with example usage: _find_dep_file_path(main_file, file_path, relative_path_search) and returns: canonical_filename, canonical_filename