Bad mesh in 2.9?

i got some small script to find any bad mesh in old 2.79 files
but does not work in 2.9

is there an equivalent in 2.9 ?

here is script in 2.79

import bpy

cn1=0
cn2=0

bad1=[]

for m in bpy.data.meshes:

if m.validate(1):
    print ('Bad mesh    $$$$$$$$$$$$$$$   m =  ',m)
    print ('mesh name =',m.name)
    bad1.append(m.name)
    cn1+=1
else:
    
    cn2+=1

print ()
print (‘Bad mesh count =’,cn1)
print (‘good mesh count =’,cn2)
print ()

problem seems to be line with the m.validate command!

thanks
happy bl

i got this from 2.9 API

validate(verbose=False, clean_customdata=True)

but is it the same modified command ?

how to set it up ?

thanks
happy bl