EXHIBIT_FORM_TYPES = ["10-K", "20-F"]
LLM_FORM_TYPES = ["10-K", "10-Q", "8-K", "20-F", "6-K"]
SUBSIDIARY_EXHIBIT_PREFIXES = ("ex-21", "ex-8")

def filing_url(cik, filing):
    return (
        f"https://www.sec.gov/Archives/edgar/data/{cik}"
        f"/{filing['accessionNumberClean']}/{filing['primaryDocument']}"
    )

def create_result(company_info, portfolio=None, filings=None):
    result = {"company": company_info["name"], "cik": company_info["cik"]}
    if portfolio is not None:
        result["portfolio"] = portfolio
    if filings is not None:
        result["filings"] = filings
    return result
