@staticmethod<EOL><INDENT>def _systemd_notify_once():<DEDENT>
notify_socket = os.getenv('<STR_LIT>')<EOL>if notify_socket:<EOL><INDENT>if notify_socket.startswith('<STR_LIT:@>'):<EOL><INDENT>notify_socket = '<STR_LIT>' % notify_socket[<NUM_LIT:1>:]<EOL><DEDENT>sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)<EOL>with contextlib.closing(sock):<EOL><INDENT>try:<EOL><INDENT>sock.connect(notify_socket)<EOL>sock.sendall(b'<STR_LIT>')<EOL>del os.environ['<STR_LIT>']<EOL><DEDENT>except EnvironmentError:<EOL><INDENT>LOG.debug("<STR_LIT>", exc_info=True)<EOL><DEDENT><DEDENT><DEDENT>
Send notification once to Systemd that service is ready.

        Systemd sets NOTIFY_SOCKET environment variable with the name of the
        socket listening for notifications from services.
        This method removes the NOTIFY_SOCKET environment variable to ensure
        notification is sent only once.