def create_datastore_write_config(mapreduce_spec):
 force_writes = parse_bool(mapreduce_spec.params.get('force_writes', 'false'))
 if force_writes:
  return datastore_rpc.Configuration(force_writes=force_writes)
 else:
  return datastore_rpc.Configuration()

def create_datastore_write_config ( mapreduce_spec ) : force_writes = parse_bool ( mapreduce_spec . params . get ( 'force_writes' , 'false' ) ) if force_writes : return datastore_rpc . Configuration ( force_writes = force_writes ) else : return datastore_rpc . Configuration ( )
creates datastore config to use in write operations .