Argument values in `bmesh.ops.similar_verts()` Can someone please help me understand the values for the arguments in the function bmesh.ops.simlar_verts(bm, verts, type, thresh, compare)

I understand that:
bm- is the bmesh you are working on
verts- is a list of BMVerts to base the selection on
thresh- is some kind of distance based threshold

But what on earth do the int values for type and compare relate to?

I have played around with the values and have noted they select different patterns of vertices but I can't figure out the pattern. The docs don't appear to have any information for the values.

If you can explain to me what these values relate to or point me in the direction of an answer I would be extremely grateful.
Check the source where docs are lacking.

Similarly to this answer re bmesh.ops.delete look at source of bmesh/intern/bmesh_operators.h

On compare

enum {
    SIM_CMP_EQ = 0,
    SIM_CMP_GT,
    SIM_CMP_LT
};


The int enum values for equality is 0, greater than 1, and less than 2.

On types

/* similar vertex selection slot values */
enum {
    SIMVERT_NORMAL = 0,
    SIMVERT_FACE,
    SIMVERT_VGROUP,
    SIMVERT_EDGE
};


On types it appears to check, 0 checks normals, 1 linked faces, 2 vertex group, and 3 linked edges.

Note

The bmesh similar operators appear to have been removed from 2.8