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

I’m trying to get a vector to create a gizmo positioning matrix, but I can’t get the correct direction of the vector in any way. Can I do something wrong?

# selected object(multiple)
uniques = bpy.context.objects_in_mode_unique_data  
bms = {}
for obj in uniques:
    bms[obj] = bmesh.from_edit_mesh(

# get vertex normal
verts_normal = [] 
for obj in bms:
    verts_normal.extend([v.normal for v in bms[obj].verts if]) 

#get faces normal
verts = []
for obj in bms:
    verts.extend([v for v in bms[obj].verts if]) 

face_ind = []
faces_normal = []
for vert in verts:
    face_ind.extend([f.index for f in vert.link_faces]) 
    #faceID = [f.index for f in vert.link_faces]
for i in face_ind:
    for obj in bms:
        faces_normal.extend([f.normal for f in bms[obj].faces if f.index == i])  

#median vector
normal_vector = Vector(sum(faces_normal, Vector()) / len(faces_normal))

#normal matrix
eul = Euler(normal_vector, 'XYZ')
mat_rot_new = eul.to_matrix().to_4x4()