def is_final(name, mro):
 return any((isinstance(getattr(c, '__dict__', {}).get(name), final) for c in bases_mro(mro)))

def is_final ( name , mro ) : return any ( ( isinstance ( getattr ( c , '__dict__' , { } ) . get ( name ) , final ) for c in bases_mro ( mro ) ) )
return true if the given class/function node correspond to final definition .