Final answer:
Ependymal cells are responsible for producing cerebrospinal fluid (CSF) by filtering blood and helping in the regulation of its flow within the CNS, primarily through the ventricular system.
Step-by-step explanation:
The function of ependymal cells is to filter blood and produce cerebrospinal fluid (CSF), which circulates throughout the central nervous system (CNS). These cells line the ventricles, or central cavities located within the brain and form the choroid plexus, where they come in contact with blood vessels. Through this contact, they filter and absorb components of the blood, play a role in the blood-brain barrier, and with their cilia, help to regulate the flow of CSF through the ventricular system. Therefore, among the given options, the main function of ependymal cells is the production of cerebrospinal fluid and the regulation of its flow within the CNS.