<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _put_attachment_data(self, id, filename, data, content_type, include_online=False):
 """Upload an attachment to the Xero object."""

        uri = '/'.join([self.base_url, self.name, id, 'Attachments', filename])
        params = {'IncludeOnline': 'true'} if include_online else {}
        headers = {'Content-Type': content_type, 'Content-Length': str(len(data))}
        return uri, params, 'put', data, headers, False