A baby demonstrates behaviors of both wakefulness and sleep; there is generalized motor activity; the baby's eyes may be closed, or they may open and close rapidly. What is the term for this state, which occurs when the baby is awakening?