class_docstr: Open a track to call the annotated function.
  Display `spec`, which is a string, where $0, $1, $2 stand in for the various arguments to the function.
  For example:
  
      @htrack("a=$1, b=$2"):
      def compute(self, a, b):
          ...
class_docstr_tok: ["Open","a","track","to","call","the","annotated","function",".","Display","`","spec","`",",","which","is","a","string",",","where","$","0",",","$","1",",","$","2","stand","in","for","the","various","arguments","to","the","function",".","For","example",":","@","htrack","(","``","a=","$","1",",","b=","$","2","''",")",":","def","compute","(","self",",","a",",","b",")",":","..."]
code: def __call__(self, fn: Callable) -> Any:
      def wrapper(*args, **kwargs):  # type:ignore
          if len(args) > 0 and hasattr(args[0], fn.__name__):
              parent = type(args[0]).__name__ + "."
          else:
              parent = ""
          if self.spec is not None:
              description = ": " + self.spec
              for i, v in enumerate(args):
                  description = description.replace(
                      "$" + str(i), str(v)
                  )
              for k, v in kwargs.items():
                  description = description.replace("$" + k, str(v))
          else:
              description = ""
          with htrack_block(parent + fn.__name__ + description):
              return fn(*args, **kwargs)
  
      return wrapper
  
file_path: H2O/h2o_hf/helm/src/helm/common/hierarchical_logger.py
imports: import sys
  import time
  from typing import Any, Callable, List, Optional
label_desc: Use image node_id 2 for calling the htrack obj's underlying member method code with example usage: obj.__call__(fn) and returns: wrapper, fn