Rather than:
if hasattr(function, 'iter_metadata'):
since_id = content[function.iter_metadata].get('since_id_str')
it should be
if hasattr(function, 'iter_metadata'):
since_id = content[function.iter_metadata].get('max_id_str')
Currently, the cursor function only goes forward in time so since_id should be set to maximum id of the latest tweets.