def _check_stats(conn):
 stats = conn.get_stats()
 if (not stats):
  raise CommandExecutionError('memcached server is down or does not exist')
 return stats

def _check_stats ( conn ) : stats = conn . get_stats ( ) if ( not stats ) : raise CommandExecutionError ( 'memcached server is down or does not exist' ) return stats
helper function to check the stats data passed into it .