<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filing_history(self, num, transaction=None, **kwargs):
 """Search for a company's filling history by company number. Args: num (str):
 Company number to search on. transaction (Optional[str]):
 Filing record number. kwargs (dict):
 additional keywords passed into requests.session.get params keyword. """

        baseuri = self._BASE_URI + "company/{}/filing-history".format(num)
        if transaction is not None:
            baseuri += "/{}".format(transaction)
        res = self.session.get(baseuri, params=kwargs)
        self.handle_http_error(res)
        return res