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 scalar(self, tag: str, x: Union[int, float], step: int) -> None:
      self.writer.add_scalar(tag, x, step)
  
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 3 for calling the TensorBoard obj's underlying member method code with example usage: obj.scalar(tag, x, step) without return types