<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def upsert(self, body, raise_exc=True, headers=False, files=None):
        '''Performs an HTTP PUT to the server. This is an idempotent
        call that will create the resource this navigator is pointing
        to, or will update it if it already exists.

        `body` may either be a string or a dictionary representing json
        `headers` are additional headers to send in the request
        '''
        return self._request(PUT, body, raise_exc, headers, files)