Wrong order of dofs after creating mesh from lists of points and cells

Yes, I would like to make facet tags based on the cell domains in order to define the facets of the cells which define the edge of each subdomain. The facet marker would have the same value of cell marker for a certain cell.

Something similar has been discussed here:

(Referring to the picture of the linked question, I would like to identify the facets “corresponding” to the points with the red cross. If the yellow subdomain is defined by cell tags with value 1, the drawn facets would have value 1).

The question is: is there a sort of built-in method in dolfinx or do I have to apply the same logic for each subdomain? In this case I need facets in order to use locate_dofs_topological method to identify dofs on the edge of a certain subdomain.

I hope I have clarified the concept. Thank you for your help!