def register_security_check(name, cls):
 _populate_security_checks()
 if (name in _security_checks):
  raise KeyError((u'"%s" is already a registered security check' % name))
 _security_checks[name] = cls

def register_security_check ( name , cls ) : _populate_security_checks ( ) if ( name in _security_checks ) : raise KeyError ( ( u'"%s" is already a registered security check' % name ) ) _security_checks [ name ] = cls
register a custom security check .