class_docstr: Meter to calculate mean AP metric for multi-label image classification task.
  
  Args:
      meters_config (AttrDict): config containing the meter settings
  
  meters_config should specify the num_classes
class_docstr_tok: ["Meter","to","calculate","mean","AP","metric","for","multi-label","image","classification","task",".","Args",":","meters_config","(","AttrDict",")",":","config","containing","the","meter","settings","meters_config","should","specify","the","num_classes"]
docstr: Globally syncing the state of each meter across all the trainers.
  We gather scores, targets, total sampled
docstr_tok: ["Globally","syncing","the","state","of","each","meter","across","all","the","trainers",".","We","gather","scores",",","targets",",","total","sampled"]
code: def sync_state(self):
      """
      Globally syncing the state of each meter across all the trainers.
      We gather scores, targets, total sampled
      """
      # Communications
      self._curr_sample_count = all_reduce_sum(self._curr_sample_count)
      self._scores = self.gather_scores(self._scores)
      self._targets = self.gather_targets(self._targets)
  
      # Store results
      self._total_sample_count += self._curr_sample_count
  
      # Reset values until next sync
      self._curr_sample_count.zero_()
  
imports: import logging
  import numpy
  import torch
  from classy_vision.generic.distributed_util import all_reduce_sum, gather_from_all
  from classy_vision.meters import ClassyMeter, register_meter
  from vissl.config import AttrDict
  from vissl.utils.env import get_machine_local_and_dist_rank
  from vissl.utils.svm_utils.evaluate import get_precision_recall
label_desc: Use image node_id 7 for calling the MeanAPMeter obj's underlying member method code with example usage: obj.sync_state() without return types