href = element.get("href")
                    if href:
                        text_parts.append(f"{element.get_text()} ({href})")
                    else:
                        text_parts.append(element.get_text())
                else:
                    text_parts.append(element.get_text())
        return " ".join(text_parts)
[docs]    @staticmethod
    def remove_unnecessary_lines(content: str) -> str:
        """
        Clean up the content by removing unnecessary lines.
        Args:
            content: A string, which may contain unnecessary lines or spaces.
        Returns:
            A cleaned string with unnecessary lines removed.
        """
        lines = content.split("\n")
        stripped_lines = [line.strip() for line in lines]
        non_empty_lines = [line for line in stripped_lines if line]
        seen = set()
        deduped_lines = []
        for line in non_empty_lines:
            if line not in seen:
                seen.add(line)
                deduped_lines.append(line)
        cleaned_content = " ".join(deduped_lines)
        return cleaned_content
[docs]    async def atransform_documents(
        self,
        documents: Sequence[Document],
        **kwargs: Any,
    ) -> Sequence[Document]:
        raise NotImplementedError