docs: def _rollup_shard_stats_to_instance_stats(self, shard_stats):
          """
          roll up all shard stats to instance level stats
  
          :param shard_stats: dict of {shard_name: shard level stats}
          """
          instance_stats = {}
          opcounters_per_node = []
  
          # aggregate replication_lag
          instance_stats['replication_lag'] = max(map(lambda s: s['replication_lag'], shard_stats.values()))
  
          aggregate_server_statistics = {}
          for shard_name, stats in shard_stats.items():
              for statistic_key in stats.get('shard_stats'):
                  if statistic_key != 'connections' and statistic_key in aggregate_server_statistics:
                      aggregate_server_statistics[statistic_key] = util.sum_values(aggregate_server_statistics[statistic_key],
                                                                                   stats.get('shard_stats')[statistic_key])
                  else:
                      aggregate_server_statistics[statistic_key] = stats.get('shard_stats')[statistic_key]
  
              # aggregate per_node_stats into opcounters_per_node
              opcounters_per_node.append({shard_name: {member: node_stats['opcounters']
                                                       for member, node_stats in stats.get('per_node_stats').items()}})
  
          instance_stats['opcounters_per_node'] = opcounters_per_node
          instance_stats['aggregate_server_statistics'] = aggregate_server_statistics
          return instance_stats