def METHOD_NAME(spec, state, block):
    assert state.slot < block.slot  # Preserve assertion from state transition to avoid strange pre-states from testing
    if state.slot < block.slot:
        spec.process_slots(state, block.slot)
    assert state.latest_block_header.slot < block.slot  # There may not already be a block in this slot or past it.
    assert state.slot == block.slot  # The block must be for this slot
    spec.process_block(state, block)
    return block