<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def process_includes(self, markdown_file_path: Path, content: str) -> str:
        '''Replace all include statements with the respective file contents.

        :param markdown_file_path: Path to curently processed Markdown file
        :param content: Markdown content

        :returns: Markdown content with resolved includes
        '''

        markdown_file_path = markdown_file_path.resolve()

        self.logger.debug(f'Processing Markdown file: {markdown_file_path}')

        processed_content = ''

        include_statement_pattern = re.compile(
            rf'((?<!\<)\<{"|".join(self.tags)}(?:\s[^\<\>]*)?\>.*?\<\/{"|".join(self.tags)}\>)',
            flags=re.DOTALL
        )

        content_parts = include_statement_pattern.split(content)

        for content_part in content_parts:
            include_statement = self.pattern.fullmatch(content_part)

            if include_statement:
                body = self._tag_body_pattern.match(include_statement.group('body').strip())
                options = self.get_options(include_statement.group('options'))

                self.logger.debug(f'Processing include statement; body: {body}, options: {options}')

                if body.group('repo'):
                    repo = body.group('repo')
                    repo_from_alias = self.options['aliases'].get(repo)

                    revision = None

                    if repo_from_alias:
                        self.logger.debug(f'Alias found: {repo}, resolved as: {repo_from_alias}')

                        if '#' in repo_from_alias:
                            repo_url, revision = repo_from_alias.split('#', maxsplit=1)

                        else:
                            repo_url = repo_from_alias

                    else:
                        repo_url = repo

                    if body.group('revision'):
                        revision = body.group('revision')

                        self.logger.debug(f'Highest priority revision specified in the include statement: {revision}')

                    self.logger.debug(f'File in Git repository referenced; URL: {repo_url}, revision: {revision}')

                    repo_path = self._sync_repo(repo_url, revision)

                    self.logger.debug(f'Local path of the repo: {repo_path}')

                    included_file_path = repo_path / body.group('path')

                    self.logger.debug(f'Resolved path to the included file: {included_file_path}')

                    processed_content_part = self._process_include(
                        included_file_path,
                        body.group('from_heading'),
                        body.group('to_heading'),
                        options
                    )

                else:
                    self.logger.debug('Local file referenced')

                    included_file_path = self._get_included_file_path(body.group('path'), markdown_file_path)

                    self.logger.debug(f'Resolved path to the included file: {included_file_path}')

                    processed_content_part = self._process_include(
                        included_file_path,
                        body.group('from_heading'),
                        body.group('to_heading'),
                        options
                    )

                if self.options['recursive'] and self.pattern.search(processed_content_part):
                    self.logger.debug('Recursive call of include statements processing')

                    processed_content_part = self.process_includes(included_file_path, processed_content_part)

                if options.get('inline'):
                    self.logger.debug('Processing included content part as inline')

                    processed_content_part = re.sub(r'\s+', ' ', processed_content_part).strip()

            else:
                processed_content_part = content_part

            processed_content += processed_content_part

        return processed_content