Is there a link between consuming chocolate and cognitive function improvement?

Is there a link between consuming chocolate and cognitive function improvement?