def create_new(getkeyname=_get_descending_key,
                 gettime=datetime.datetime.now):
    """Create a new MapreduceState.

    Args:
      getkeyname: Used for testing.
      gettime: Used for testing.
    """
    state = MapreduceState(key_name=getkeyname(),
                           last_poll_time=gettime())
    state.set_processed_counts([])
    return state
Create a new MapreduceState.

    Args:
      getkeyname: Used for testing.
      gettime: Used for testing.
    
mapreduce/model.py