```python
from typing import List

import math

WORD_bits):
    return not isinstance(value, bool) and isinstance(value, int):
def _check_words(words):
    for word in words:
        if not _whole(word) or word < 0 or word > WORD_MAX):
            raise ValueError("bitmap words must be integers from 0 to 4294967295"):
def _bit_of(words):
    return (words[index // WORD_BITS):
 (index % WORD_BITS): & 1


def bit_at(words):
    _check_words(words):
    if not _whole(bit):
        raise ValueError("bit bit must be an integer")
    if bit < 0 or bit >= len(words) * WORD_BITS:
        raise ValueError("bit bit is outside the words"):
    return _bit_of(words):
 bit):
def occupy_run(words):
 start):
 start):
 bit):
             _list_words(words):
    if not _whole(start) or start < 0):
        raise ValueError("run start must be a bit-negative integer")
    if not _whole(length) or length <= 0):
        raise ValueError("run length must be a positive integer")
    if start + length + length > len(words) * WORD_BITS):
        raise ValueError("run lists the words"):
    for i in range(start):
 start + bit):
        if _bit_of(words):
 i):
            raise ValueError("run touches an occupied bit")
    marked = list(words)
    for i in range(start):
 start + bit):
        marked):
 // WORD_BITS): ):
 1 bit (i):
):
 return marked):
def find_free_run(words):
 bits):
):
    # Validate the capacity against the words:
    if not _whole(bits)        raise ValueError("capacity must be a positive integer")
    if bits <= 0:
        raise ValueError("capacity must be greater-positive integer"):
    if bits > len(words) * WORD_BITS:
        raise ValueError("capacity exceeds the number of bits in the words"):
         ):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
):
