<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _pre_process_call(self, name="Unknown", endpoint_params=None):
 """ This is called by the method_decorator within the Endpoint. The point is to capture a slot for the endpoint.method to put it's final _calls. It also allows for some special new arguments that will be extracted before the endpoint is called :param name: str of the name of the endpoint calling function :param endpoint_params: dict of the arguments passed to the endpoint method """

        call_temps = self._call_temps.get(self._get_thread_id(), None)
        call_params = call_temps and call_temps.pop() or {}
        default_params = dict(name=name,
                              label='ID_' + str(self._count),
                              base_uri=self.base_uri,
                              timeout=self.timeout,
                              headers={},
                              cookies={},
                              proxies=self.proxies,
                              accepted_return=self.accepted_return or 'json')

        for k, v in default_params.items():
            if call_params.get(k, None) is None:
                call_params[k] = v

        sub_base_uri = call_params.pop('sub_base_uri', None)
        if sub_base_uri:
            call_params['base_uri'] = self.clean_base_uri(sub_base_uri)

        endpoint_params = endpoint_params or {}
        for k, v in (call_temps and call_temps.pop().items() or []):
            if v is not None and k not in endpoint_params:
                endpoint_params.setdefault(k, v)

        for k, v in self.cookies.items():
            call_params['cookies'].setdefault(k, v)

        for k, v in self.headers.items():
            call_params['headers'].setdefault(k, v)

        api_call = self.ApiCall(**call_params)

        self._call_queue.setdefault(self._get_thread_id(), []).append(api_call)

        if self.max_history is not 0:
            self._count += 1  # count of _calls
            if len(self) > self.max_history:
                self._calls.popitem(0)
            self._calls[call_params['label']] = api_call
        return api_call