code: def formatTime(self, record, datefmt=None):
      newDateTime = None
  
      if Formatter.DATETIME_HOOK is not None:
          newDateTime = Formatter.DATETIME_HOOK()
  
      if newDateTime is None:
          ret = super(Formatter, self).formatTime(record, datefmt)
      else:
          ret = str(newDateTime)
      return ret
  
file_path: pyalgotrade/pyalgotrade/logger.py
imports: import logging
  import threading
label_desc: Use image node_id 1 for calling the Formatter obj's underlying member method code with example usage: obj.formatTime(record, datefmt) and returns: ret