from typing import Collection
import requests


def efetch_sequences_request(headers: Collection) -> requests.Response:
    """Sends POST request for sequence retrieval from NCBI Entrez."""
    response = requests.post(
        "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?",
        params={"db": "nuccore", "rettype": "fasta"},
        files={"id": ",".join(headers)},
    )
    if response.status_code != 200:
        raise requests.HTTPError(
            f"Error fetching sequences from NCBI [code {response.status_code}]."
            " Bad query IDs?"
        )
    return response