class_docstr: A custom TensorBoard class that accepts EagerPy tensors and that
  can be disabled by turned into a noop by passing logdir=False.
  
  This makes it possible to add tensorboard logging without any if
  statements and without any computational overhead if it's disabled.
code: def __init__(self, logdir: Union[Literal[False], None, str]):
      if logdir or (logdir is None):
          from tensorboardX import SummaryWriter
  
          self.writer = SummaryWriter(logdir=logdir)
      else:
          self.writer = None
  
file_path: foolbox/foolbox/tensorboard.py
imports: from typing import Union, Callable, TypeVar, Any, cast
  from typing_extensions import Literal
  import eagerpy
  from functools import wraps
label_desc: Use image node_id 1 to create a new TensorBoard object  with example: obj = TensorBoard(logdir)