def _calc_time_threshold(seg_mean: float, seg_std: float) -> float:
    """
    Auxiliary function for calculating the threshold.

    Based on the mean and standard deviation of the time transitions
    between adjacent places on discrete MoveDataFrame.

    Parameters
    ----------
    seg_mean : float
        The time mean between two local labels (segment).
    seg_std : float
        The time mean between two local labels (segment).

    Return
    ------
    float
        The threshold based on the mean and standard deviation
        of transition time for the segment.

    Examples
    --------
    >>> from pymove.utils.datetime import _calc_time_threshold
    >>> print(_calc_time_threshold(12.3, 2.1))
    14.4
    >>> print(_calc_time_threshold(1, 1.5))
    2.5
    >>> print(_calc_time_threshold(-2, 2))
    0.0
    """
    threshold = seg_std + seg_mean
    threshold = float(f'{threshold:.1f}')
    return threshold