def has_multiple_pks(model):
 if (not hasattr(model, '_sa_class_manager')):
  raise TypeError('model must be a sqlalchemy mapped model')
 return (len(model._sa_class_manager.mapper.primary_key) > 1)

def has_multiple_pks ( model ) : if ( not hasattr ( model , '_sa_class_manager' ) ) : raise TypeError ( 'model must be a sqlalchemy mapped model' ) return ( len ( model . _sa_class_manager . mapper . primary_key ) > 1 )
return true .