class_docstr: The user-facing class that provides metric storage functionalities.
  
  In the future we may add support for storing / logging other types of data if needed.
docstr: Yields:
      A context within which all the events added to this storage
      will be prefixed by the name scope.
docstr_tok: ["Yields",":","A","context","within","which","all","the","events","added","to","this","storage","will","be","prefixed","by","the","name","scope","."]
code: def name_scope(self, name):
      """
      Yields:
          A context within which all the events added to this storage
          will be prefixed by the name scope.
      """
      old_prefix = self._current_prefix
      self._current_prefix = name.rstrip("/") + "/"
      yield
      self._current_prefix = old_prefix
  
imports: import datetime
  import json
  import logging
  import os
  import time
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import cached_property
  from typing import Optional
  import torch
  from fvcore.common.history_buffer import HistoryBuffer
  from detectron2.utils.file_io import PathManager
label_desc: Use image node_id 18 for calling the EventStorage obj's underlying member method code with example usage: obj.name_scope(name) without return types