import re


def extract_adquisition_rate(line):
    """Extracts the adquisition rate in Hz from the line of text that
    is supposed to contain that information. Raises an exception if it is not
    found.

    INPUT:
        line: string, file line containing a number followed by "Hz".

    OUTPUT:
        integer.

    EXAMPLE:
        From the string 'High speed data using 1000 Hz Trigger Frequency.'
        the function will return 1000.
    """
    match = re.search(r'(\d+) Hz', line)

    if match:
        return int(match.group(1))
    else:
        raise RuntimeError(f'Adquisition rate not found in line: {line}')