<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_request(self):
 """ Accept a request, up to the given number of allowed threads. Defer to self.overloaded if there are already too many pending requests. """

        # Note that this class must be mixed with another class that implements get_request()
        request, client_addr = super(BoundedThreadingMixIn, self).get_request()
        overload = False
        with self._thread_guard:
            if self._threads is not None and len(self._threads) + 1 > MAX_RPC_THREADS:
                overload = True

        if overload:
            res = self.overloaded(client_addr)
            request.sendall(res)

            sys.stderr.write('{} - - [{}] "Overloaded"\n'.format(client_addr[0], time_str(time.time())))
            self.shutdown_request(request)
            return None, None

        return request, client_addr