<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_serving(self) -> bool: """ Tell whether the server is accepting new connections or shutting down. """

        try:
            # Python ≥ 3.7
            return self.server.is_serving()  # type: ignore
        except AttributeError:  # pragma: no cover
            # Python < 3.7
            return self.server.sockets is not None