<Tr> <Th> FMA </Th> <Td> 84013 </Td> </Tr> <Tr> <Td_colspan="2"> Anatomical terms of neuroanatomy (edit on Wikidata) </Td> </Tr> <P> The basal ganglia (or basal nuclei) is a group of subcortical nuclei, of varied origin, in the brains of vertebrates including humans, which are situated at the base of the forebrain . Basal ganglia are strongly interconnected with the cerebral cortex, thalamus, and brainstem, as well as several other brain areas . The basal ganglia are associated with a variety of functions including: control of voluntary motor movements, procedural learning, routine behaviors or "habits" such as teeth grinding, eye movements, cognition, and emotion . </P> <P> The main components of the basal ganglia--as defined functionally--are the striatum; both dorsal striatum (caudate nucleus and putamen) and ventral striatum (nucleus accumbens and olfactory tubercle), globus pallidus, ventral pallidum, substantia nigra, and subthalamic nucleus . Each of these components has a complex internal anatomical and neurochemical organization . The largest component, the striatum (dorsal and ventral), receives input from many brain areas beyond the basal ganglia, but only sends output to other components of the basal ganglia . The pallidum receives input from the striatum, and sends inhibitory output to a number of motor - related areas . The substantia nigra is the source of the striatal input of the neurotransmitter dopamine, which plays an important role in basal ganglia function . The subthalamic nucleus receives input mainly from the striatum and cerebral cortex, and projects to the globus pallidus . </P>

Where is the basal ganglia located and what does it do
find me the text answering this question