def check_user_tags(dt):
 try:
  frappe.db.sql((u'select `_user_tags` from `tab%s` limit 1' % dt))
 except Exception as e:
  if (e.args[0] == 1054):
   DocTags(dt).setup()

def check_user_tags ( dt ) : try : frappe . db . sql ( ( u'select `_user_tags` from `tab%s` limit 1' % dt ) ) except Exception as e : if ( e . args [ 0 ] == 1054 ) : DocTags ( dt ) . setup ( )
if the user does not have a tags column .