def s3_get_last_record_id(tablename):
 session = current.session
 if ((RCVARS in session) and (tablename in session[RCVARS])):
  return session[RCVARS][tablename]
 else:
  return None

def s3_get_last_record_id ( tablename ) : session = current . session if ( ( RCVARS in session ) and ( tablename in session [ RCVARS ] ) ) : return session [ RCVARS ] [ tablename ] else : return None
reads the last record id for a resource from a session .