How do I get the normal vector of a selected vertex?(BMESH)
Track to Quaternion

To align to vertex normal.

The normal orientation with respect to vertices appear to be a track to quaternion, tracking Z in direction of normal, and using -Y as up.  Since the only options for up in Vector.to_track_quat(to, up) are 'X', 'Y', 'Z' track with Y up and inverting the scale in X and Y.



Simple example. Run in object mode, adds an empty displayed as arrows, at each vertex aligned to normal. 

import bpy
from mathutils import Matrix

context = bpy.context

ob = context.object
mw = ob.matrix_world
me = ob.data
Sx = Matrix.Scale(-1, 4, (1, 0, 0))
Sy = Matrix.Scale(-1, 4, (0, 1, 0))

S = Sx @ Sy

for v in me.vertices:
    R = v.normal.to_track_quat('Z', 'Y').to_matrix().to_4x4()
    R.translation = mw @ v.co

    bpy.ops.object.empty_add()
    mt = context.object
    mt.empty_display_type = 'ARROWS'
    mt.matrix_world = R @ S


Related 

Align to face normal vector