#NEWLINE# @ staticmethod #NEWLINE# def create_new( mapreduce_id = None , gettime = datetime . datetime . now ) : #NEWLINE# #INDENT# 'Create a new MapreduceState.\n\n    Args:\n      mapreduce_id: Mapreduce id as string.\n      gettime: Used for testing.\n    ' #NEWLINE# if ( not mapreduce_id ) : #NEWLINE# #INDENT# mapreduce_id = MapreduceState . new_mapreduce_id ( ) #NEWLINE# #UNINDENT# state = MapreduceState ( key_name = mapreduce_id , last_poll_time = gettime ( ) ) #NEWLINE# state . set_processed_counts ( [ ] ) #NEWLINE# return gettime