Problem with "meshvaluecollection.py"

Hello everybody,
I’m having problems with the meshvaluecollection function, I didn’t understand what parameters I have to pass it and what kind of object it generates.
I am using a script that uses that function, in particular:

mesh = Mesh("brain.xml")
mvc_Dxx = MeshValueCollection ("double", mesh, "meshDxx.xml")

but I get such error message:

Traceback (most recent call last):
  File "/Users/lorenzomarta/Desktop/Paziente1/Pre-simulazione/defDT.py", line 9, in <module>
    mvc_Dxx = MeshValueCollection("double", mesh, "meshDxx.xml")
  File "/Applications/anaconda3/envs/fenicsproject/lib/python3.10/site-packages/dolfin/mesh/meshvaluecollection.py", line 16, in __new__
    return mvc(mesh, dim)
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to read DOLFIN XML data.
*** Reason:  Unable to find tag <mesh_value_collection>.
*** Where:   This error was encountered inside xmlutils.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2019.1.0
*** Git changeset:  
*** -------------------------------------------------------------------------

I think this is a bug in Dolfin. I run the following code to generate a mesh and a mesh function and export them to Dolfin XML files:

from fenics import *

mesh = UnitSquareMesh(4,4)
meshFunc = MeshFunction('double', mesh, mesh.topology().dim()-1, 0.0)
CompiledSubDomain('near(x[0], 1)').mark(meshFunc, 0.5)
CompiledSubDomain('near(x[0], x[1])').mark(meshFunc,0.25)

file = File('brain.xml')
file.write(mesh)

meshVals = MeshValueCollection('double', mesh, mesh.topology().dim()-1)
meshVals.assign(meshFunc)
file = File('meshDxx.xml')
file.write(meshFunc)

In the file meshDxx.xml I see:

<?xml version="1.0"?>
<dolfin xmlns:dolfin="http://fenicsproject.org">
  <mesh_function>
    <mesh_value_collection name="f" type="double" dim="1" size="96">
      <value cell_index="0" local_entity="0" value="0.000000" />
      <value cell_index="0" local_entity="1" value="0.250000" />
      ...
    </mesh_value_collection>
  </mesh_function>
</dolfin>

I then run the following code to load the mesh and mesh function, and receive the same error that you do:

from fenics import *

mesh = Mesh('brain.xml')

meshVals = MeshValueCollection('double', mesh, mesh.topology().dim()-1)
file = File("meshDxx.xml")
file.read(meshVals)

The error occurs because XMLMeshValueCollection looks for an XML node named mesh_value_collection inside the dolfin XML node. However, as you can see in the above XML snippet, the mesh_value_collection node is wrapped inside a mesh_function node. If I manually edit meshDxx.xml to remove the mesh_function XML tags, I am able to successfully read the MeshValueCollection using file.read(meshVals), i.e.:

<?xml version="1.0"?>
<dolfin xmlns:dolfin="http://fenicsproject.org">
  <!--<mesh_function>-->
    <mesh_value_collection name="f" type="double" dim="1" size="96">
      <value cell_index="0" local_entity="0" value="0.000000" />
      <value cell_index="0" local_entity="1" value="0.250000" />
      <value cell_index="0" local_entity="2" value="0.000000" />
      ...
    </mesh_value_collection>
  <!--</mesh_function>-->
</dolfin>

The form of my ‘meshDxx.xml’ object is this:

<?xml version="1.0"?>
<dolfin xmlns:dolfin="http://www.fenicsproject.org">
  <mesh celltype="tetrahedron" dim="3">
    <vertices size="50386">
      <vertex index="0" x="237.157" y="260.227" z="-3.14708" />
      <vertex index="1" x="220.89" y="233.392" z="6.26251" />

I did by means of the following command run from the terminal:

vmtk vmtkmeshwriter -ifile meshDxx.vtu -ofile meshDxx.xml -f "dolfin"

The .vtu file has the tensor information, however, whereas the .xml file does not seem to me to have it, since it only gives me info on the coordinates of the vertices and the connectivity of the tetrahedra that make up the mesh.