def __init__(self,
                 tensorplex,
                 period,
                 is_average=True,
                 keep_full_history=False):
        """
        Args:
            tensorplex: TensorplexClient object
            period: when you call `update()`, it will only send to Tensorplex
                at the specified period.
            is_average: if True, send the averaged value over the last `period`.
            keep_full_history: if False, only keep the last `period` of history.
        """
        if tensorplex is not None:  # None to turn off tensorplex
            U.assert_type(tensorplex, TensorplexClient)
        U.assert_type(period, int)
        assert period > 0
        self._tplex = tensorplex
        self._period = period
        self._is_average = is_average
        self._keep_full_history = keep_full_history
        self._tracker = PeriodicTracker(period)
        self._history = {}
        self._max_deque_size = None if keep_full_history else period

        Args:
            tensorplex: TensorplexClient object
            period: when you call `update()`, it will only send to Tensorplex
                at the specified period.
            is_average: if True, send the averaged value over the last `period`.
            keep_full_history: if False, only keep the last `period` of history.
        
surreal/session/tracker.py