parameters: (self, file_name, extension)
docstring: Searches the source code for a matching filename with the correct extension
docstring_summary: Searches the source code for a matching filename with the correct extension
docstring_tokens: Searches the source code for a matching filename with the correct extension
function: def find_source_file(self, file_name, extension):
          """
          Searches the source code for a matching filename with the correct extension
          """
          # parse the source tree if it has not already been done
          if not self.file_lookup:
              self.parse_source_tree()
  
          try:
              path_list = self.file_lookup[file_name][extension]
              if len(path_list) == 1:
                  return path_list[0]
              else:
                  suggested_path = "os_agnostic_path_to_file_from_source_root"
                  if len(path_list) > 1:
                      suggested_path = path_list[0].replace(self.source_root, "")
                  raise SourceLinkError("Found multiple possibilities for " + file_name + "."
                                        + extension + "\n" + "Possible matches" + str(path_list)
                                        + "\n" + "Specify one using the " + extension + " option\n"
                                        + "e.g. \n" + ".. sourcelink:\n" + "      :" + extension
                                        + ": " + suggested_path)
  
              return self.file_lookup[file_name][extension]
          except KeyError:
              # value is not present
              return None
function_tokens: def find_source_file ( self , file_name , extension ) : # parse the source tree if it has not already been done if not self . file_lookup : self . parse_source_tree ( ) try : path_list = self . file_lookup [ file_name ] [ extension ] if len ( path_list ) == 1 : return path_list [ 0 ] else : suggested_path = "os_agnostic_path_to_file_from_source_root" if len ( path_list ) > 1 : suggested_path = path_list [ 0 ] . replace ( self . source_root , "" ) raise SourceLinkError ( "Found multiple possibilities for " + file_name + "." + extension + "\n" + "Possible matches" + str ( path_list ) + "\n" + "Specify one using the " + extension + " option\n" + "e.g. \n" + ".. sourcelink:\n" + "      :" + extension + ": " + suggested_path ) return self . file_lookup [ file_name ] [ extension ] except KeyError : # value is not present return None