parameters: (start_dir, filename, parent=False, limit=None, aux_dirs=None)
docstring: Find the given file by searching up the file hierarchy from start_dir.
  
      Hat tip goes to SublimeLinter 3.
  
      :param start_dir: The search start path.
      :param filename: The file name to search for.
      :param parent: If the file is found and parent is False, returns the path to the file.
          If parent is True the path to the file's parent directory is returned.
      :param limit: If limit is None, the search will continue up to the root directory.
          Otherwise a maximum of limit directories will be checked.
      :param aux_dirs: If aux_dirs is not empty and the file hierarchy search failed,
          those directories are also checked.
docstring_summary: Find the given file by searching up the file hierarchy from start_dir.
docstring_tokens: Find the given file by searching up the file hierarchy from start_dir .
function: def _find_file(start_dir, filename, parent=False, limit=None, aux_dirs=None):
      """
      Find the given file by searching up the file hierarchy from start_dir.
  
      Hat tip goes to SublimeLinter 3.
  
      :param start_dir: The search start path.
      :param filename: The file name to search for.
      :param parent: If the file is found and parent is False, returns the path to the file.
          If parent is True the path to the file's parent directory is returned.
      :param limit: If limit is None, the search will continue up to the root directory.
          Otherwise a maximum of limit directories will be checked.
      :param aux_dirs: If aux_dirs is not empty and the file hierarchy search failed,
          those directories are also checked.
      """
      if aux_dirs is None:
          aux_dirs = []
      for d in _climb_dirs(start_dir, limit=limit):
          target = os.path.join(d, filename)
  
          if os.path.exists(target):
              if parent:
                  return d
  
              return target
  
      for d in aux_dirs:
          d = os.path.expanduser(d)
          target = os.path.join(d, filename)
  
          if os.path.exists(target):
              if parent:
                  return d
  
              return target
function_tokens: def _find_file ( start_dir , filename , parent = False , limit = None , aux_dirs = None ) : if aux_dirs is None : aux_dirs = [ ] for d in _climb_dirs ( start_dir , limit = limit ) : target = os . path . join ( d , filename ) if os . path . exists ( target ) : if parent : return d return target for d in aux_dirs : d = os . path . expanduser ( d ) target = os . path . join ( d , filename ) if os . path . exists ( target ) : if parent : return d return target