from collections import defaultdict

from paraview import vtk


def points2edge():
    return defaultdict(
        lambda: vtk.vtkPolyLine().GetCellType(),
        {2: vtk.vtkLine().GetCellType()})


def points2face():
    return defaultdict(
        lambda: vtk.Polygon().GetCellType(),
        {3: vtk.vtkTriangle().GetCellType(), 4: vtk.vtkQuad().GetCellType()})


def points2cell():
    return {
        4: vtk.vtkTetra().GetCellType(),
        8: vtk.vtkHexahedron().GetCellType(),
        6: vtk.vtkWedge().GetCellType(),
        5: vtk.vtkPyramid().GetCellType(),
        10: vtk.vtkPentagonalPrism().GetCellType(),
        12: vtk.vtkHexagonalPrism().GetCellType()}

@@ -72,24 +72,90 @@
 nts2edge():%0A
+    %22%22%22 Return a mapping from number of points to line cells. %22%22%22%0A
     return d
@@ -158,32 +158,32 @@
 rn defaultdict(%0A
-
         lambda: 
@@ -274,24 +274,90 @@
 nts2face():%0A
+    %22%22%22 Return a mapping from number of points to face cells. %22%22%22%0A
     return d
@@ -485,32 +485,32 @@
 tCellType()%7D)%0A%0A%0A
-
 def points2cell(
@@ -508,24 +508,92 @@
 nts2cell():%0A
+    %22%22%22 Return a mapping from number of points to volume cells. %22%22%22%0A
     return %7B

add docstrings