import re


def marker_is_valid(text: str) -> bool:
    """Tests if a given marker is an NCBI accession or nucleotide sequence."""
    if re.match(r"[A-Z]{1,2}[0-9]{5,8}", text):
        return True
    if set(text) == {"A", "C", "G", "T"}:
        return True
    return False