class_docstr: Metrics manager and batch writer 
class_docstr_tok: ["Metrics","manager","and","batch","writer"]
code: def _initialize_upload_pools():
      if not Metrics._upload_pool:
          Metrics._upload_pool = ThreadPool(processes=1)
      if not Metrics._file_upload_pool:
          Metrics._file_upload_pool = ThreadPool(
              processes=config.get(
                  "network.metrics.file_upload_threads", 4
              )
          )
  
imports: import json
  import os
  from functools import partial
  from logging import warning
  from multiprocessing.pool import ThreadPool
  from time import time
  from pathlib2 import Path
  from ...backend_api import Session
  from ...backend_api.services import events
  from ..base import InterfaceBase
  from ...config import config, deferred_config
  from ...debugging import get_logger
  from ...storage.helper import StorageHelper
  from .events import MetricsEventAdapter
  from ...utilities.process.mp import SingletonLock
label_desc: Use image node_id 10 for calling the Metrics obj's underlying member method code with example usage: obj._initialize_upload_pools() without return types