def instrument_declarative(cls, registry, metadata):
 if ('_decl_class_registry' in cls.__dict__):
  raise exc.InvalidRequestError(('Class %r already has been instrumented declaratively' % cls))
 cls._decl_class_registry = registry
 cls.metadata = metadata
 _as_declarative(cls, cls.__name__, cls.__dict__)

def instrument_declarative ( cls , registry , metadata ) : if ( '_decl_class_registry' in cls . __dict__ ) : raise exc . InvalidRequestError ( ( 'Class %r already has been instrumented declaratively' % cls ) ) cls . _decl_class_registry = registry cls . metadata = metadata _as_declarative ( cls , cls . __name__ , cls . __dict__ )
given a class .