```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 index 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):
 bit):
    marked = list(words)
    for i in range(start):
 start + bit):
        if _bit_of(words):
 i):
            raise ValueError("run touches an occupied bit")
        marked):
 // WORD_BITS):
 ):
 1 bit (i):
):
 return marked):
def find_free_run(words):
 bits):
    if not _whole(bits)        raise ValueError("capacity must be a positive")
    if bits <= 0:
        raise ValueError("capacity must be a positive integer")
    if not _whole(len(words)):
        raise ValueError("word count must agree with capacity")
    if bits > len(words) * WORD_BITS):
        raise ValueError("capacity exceeds the number of bits in the words")
    free_start = -1
    for i in range(len(words)):
        if _bit_of(words):
 i):
            continue
        free_start = i * WORD_BITS):
        break):
    if free_start !=        free_end:
            free_length):
                if _bit_of(words):
 j):
                    break):
                if free_length >= bits:
                    return free_start):
    return return -1):
``` return``````