def METHOD_NAME(
    generated_docs, service_name, client, waiter_model
):
    ref_lines = ['=======', 'Waiters', '=======', 'The available waiters are:']
    for waiter_name in waiter_model.waiter_names:
        ref_lines.append(f'  {service_name}/waiter/{waiter_name}')
    for waiter_name in waiter_model.waiter_names:
        _assert_contains_lines_in_order(
            [
                '.. py:class:: {}.Waiter.{}'.format(
                    client.__class__.__name__, waiter_name
                ),
                '    waiter = client.get_waiter(\'%s\')'
                % xform_name(waiter_name),
                '  .. py:method:: wait(',
            ],
            get_nested_file_contents(service_name, 'waiter', waiter_name),
        )
    _assert_contains_lines_in_order(ref_lines, generated_docs)