Association between depression and cognitive function in middle-aged and older adults: a study based on the health and retirement study | Synapse