docstr: Call reducer.reset() with a more useful stacktrace.
  
  Normally, when we call a user's MetricReducer's methods, the stack trace does not clearly
  identify which reducer actually failed, since the information about "which reducer failed"
  is not stored on the stack (it's stored in an iterator).
  
  This can make debugging custom reducers much more difficult, so we add information to the
  stack trace for a more pleasant user experience.
docstr_tok: ["Call","reducer.reset","(",")","with","a","more","useful","stacktrace",".","Normally",",","when","we","call","a","user","'s","MetricReducer","'s","methods",",","the","stack","trace","does","not","clearly","identify","which","reducer","actually","failed",",","since","the","information","about","``","which","reducer","failed","''","is","not","stored","on","the","stack","(","it","'s","stored","in","an","iterator",")",".","This","can","make","debugging","custom","reducers","much","more","difficult",",","so","we","add","information","to","the","stack","trace","for","a","more","pleasant","user","experience","."]
code: def reset(self) -> None:
      """
      Call reducer.reset() with a more useful stacktrace.
  
      Normally, when we call a user's MetricReducer's methods, the stack trace does not clearly
      identify which reducer actually failed, since the information about "which reducer failed"
      is not stored on the stack (it's stored in an iterator).
  
      This can make debugging custom reducers much more difficult, so we add information to the
      stack trace for a more pleasant user experience.
      """
      try:
          return self.reducer.reset()
      except Exception as e:
          raise ValueError(
              f'reducer of type {type(self.reducer).__name__} for name="{self.name}" '
              "failed in a call to reset()"
          ) from e
  
imports: import abc
  import enum
  import itertools
  from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload
  import numpy
label_desc: Use image node_id 2 for calling the _WrappedReducer obj's underlying member method code with example usage: obj.reset() and returns: self