<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _calculate_solar_time(self, hour, eq_of_time, is_solar_time):
 """Calculate Solar time for an hour."""

        if is_solar_time:
            return hour

        return (
            (hour * 60 + eq_of_time + 4 * math.degrees(self._longitude) -
             60 * self.time_zone) % 1440) / 60