def METHOD_NAME(self, current_value):
    """
    Calculate PID output value from reference input and feedback
    :return: Manipulated, or control, variable. This is the PID output.
    :rtype: float
    :param current_value: The input, or process, variable (the actual
        measured condition by the input)
    :type current_value: float
    """
    # Determine if hysteresis is enabled and if the PID should be applied
    setpoint = self.check_hysteresis(current_value)
    if setpoint != self.setpoint:
        self.setpoint_band = setpoint
    else:
        self.setpoint_band = None
    if setpoint is None:
        # Prevent PID variables form being manipulated and
        # restrict PID from operating.
        return 0
    self.error = setpoint - current_value
    # Calculate P-value
    self.P_value = self.Kp * self.error
    # Calculate I-value
    self.integrator += self.error
    # First method for managing integrator
    if self.integrator > self.integrator_max:
        self.integrator = self.integrator_max
    elif self.integrator < self.integrator_min:
        self.integrator = self.integrator_min
    # Second method for regulating integrator
    # if self.period is not None:
    #     if self.integrator * self.Ki > self.period:
    #         self.integrator = self.period / self.Ki
    #     elif self.integrator * self.Ki < -self.period:
    #         self.integrator = -self.period / self.Ki
    self.I_value = self.integrator * self.Ki
    # Prevent large initial D-value
    if self.first_start:
        self.derivator = self.error
        self.first_start = False
    # Calculate D-value
    self.D_value = self.Kd * (self.error - self.derivator)
    self.derivator = self.error
    # Produce output form P, I, and D values
    pid_value = self.P_value + self.I_value + self.D_value
    self.logger.debug(
        f"PID: Input: {current_value}, Output: "
        f"P: {self.P_value}, "
        f"I: {self.I_value}, "
        f"D: {self.D_value}, "
        f"Out: {pid_value}")
    self.control_variable = pid_value