#NEWLINE# def subscribe( document_class , query , sub_id , schema = None , topic = None , lease_duration_sec = DEFAULT_LEASE_DURATION_SEC ) : #NEWLINE# #INDENT# 'Subscribe a query.' #NEWLINE# assert ( schema is None ) #NEWLINE# topic = _get_document_topic ( lease_duration_sec , topic ) #NEWLINE# schema = _model_to_entity_schema ( document_class ) #NEWLINE# return prospective_search . subscribe ( datastore . Entity , query , sub_id , schema = schema , topic = topic , lease_duration_sec = lease_duration_sec )