class_docstr: Metrics manager and batch writer 
class_docstr_tok: ["Metrics","manager","and","batch","writer"]
docstr: Storage helper used to upload files 
docstr_tok: ["Storage","helper","used","to","upload","files"]
code: def _get_storage(self, storage_uri=None):
      """Storage helper used to upload files"""
      try:
          # use a lock since this storage object will be requested by thread pool threads, so we need to make sure
          # any singleton initialization will occur only once
          self._storage_lock.acquire()
          storage_uri = storage_uri or self._storage_uri
          return StorageHelper.get(storage_uri)
      except Exception as e:
          self._get_logger().error(
              "Failed getting storage helper for %s: %s"
              % (storage_uri, str(e))
          )
      finally:
          self._storage_lock.release()
  
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 3 for calling the Metrics obj's underlying member method code with example usage: obj._get_storage(storage_uri) and returns: StorageHelper