def write_scalar(self, tag, scalar_value, global_step=None):
    if (self._writer is None):
        pass
    else:
        self._writer.add_scalar(tag, scalar_value, global_step)
def write_scalar(self, tag, scalar_value, global_step=None):
    if (self._writer is None):
        pass
    else:
        self._writer.add_scalar(tag, scalar_value, global_step)