code: def url_to_documents(urls: Union[List[str], str]) -> List[Document]:
      """Converts a given url to a document"""
      documents = []
      if isinstance(urls, str):
          urls = [urls]
  
      for url in urls:
          response = requests.get(url, headers=None).text
          html_to_text = html2text.html2text(response)
          documents.append(
              Document(
                  page_content=html_to_text, metadata={"source": url}
              )
          )
  
      return documents
  
imports: import json
  from dataclasses import dataclass
  from functools import lru_cache, partial
  from typing import Any, Dict, List, Union
  import html2text
  import openai
  import pandas
  import requests
  import writer
  from langchain import Writer
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  from langchain.docstore.document import Document
  from langchain.document_loaders import DataFrameLoader
  from langchain.embeddings.base import Embeddings
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
  from langchain.vectorstores import FAISS, Chroma, VectorStore
  from pydantic import BaseModel, Extra, Field, validator
  from mindsdb.integrations.handlers.chromadb_handler.chromadb_handler import get_chromadb
  from mindsdb.integrations.handlers.rag_handler.exceptions import InvalidOpenAIModel, InvalidPromptTemplate, InvalidWriterModel, UnsupportedLLM, UnsupportedVectorStore
label_desc: Use image node_id 6 for calling a global function with example usage: url_to_documents(urls) and returns: documents