code: def collect(self):
          
          stats_config = self.config['stats']
          if USE_PYTHON_BINDING:
              collect_metrics = self.collect_via_pynvml
          else:
              collect_metrics = self.collect_via_nvidia_smi
  
          collect_metrics(stats_config)
docs: Collector GPU stats