<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload_file(self, api_token, file_path, **kwargs):
 """Upload a file suitable to be passed as a file_attachment. :param api_token: The user's login api_token. :type api_token: str :param file_path: The path of the file to be uploaded. :type file_path: str :return: The HTTP response to the request. :rtype: :class:`requests.Response` """

        params = {
            'token': api_token,
            'file_name': os.path.basename(file_path)
        }
        with open(file_path, 'rb') as f:
            files = {'file': f}
            return self._post('upload_file', params, files, **kwargs)