class_docstr: Wrapper class for the basic BlueFog API.
class_docstr_tok: ["Wrapper","class","for","the","basic","BlueFog","API","."]
docstr: A python interface to call the timeline for EndActivity.
  
  Please check comments in timeline_start_activity for more explanation.
docstr_tok: ["A","python","interface","to","call","the","timeline","for","EndActivity",".","Please","check","comments","in","timeline_start_activity","for","more","explanation","."]
code: def timeline_end_activity(self, tensor_name: str) -> bool:
      """A python interface to call the timeline for EndActivity.
  
      Please check comments in timeline_start_activity for more explanation.
      """
      if self.warn_timeline:
          # We know timeline didn't turn on. No need to repeat it.
          return False
      self._MPI_LIB_CTYPES.bluefog_timeline.argtypes = [
          ctypes.c_bool,
          ctypes.c_char_p,
          ctypes.c_char_p,
      ]
      ret = self._MPI_LIB_CTYPES.bluefog_timeline(
          False, tensor_name.encode("utf-8"), "".encode("utf-8")
      )
      if ret != 1 and not self.warn_timeline:
          logger.error(
              "Cannot end activity in the timeline. Check "
              "Most common reason is you didn't turn on the timeline function. "
              "Use bfrun --timeline-filename file_name ... or "
              "setting the ENV variable BLUEFOG_TIMELINE = file_name"
          )
          self.warn_timeline = True
          return False
      return True
  
imports: from typing import List, Callable, Optional
  import atexit
  import contextlib
  import ctypes
  import logging
  import networkx
  import bluefog.common.util
  import bluefog.common.topology_util
label_desc: Use image node_id 27 for calling the BlueFogBasics obj's underlying member method code with example usage: obj.timeline_end_activity(tensor_name) and returns: True, False, False