<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(self, resource, payload=None):
        ''' Wrapper around requests.put that shorten caller url and takes care
        of errors '''
        # Avoid dangerous default function argument `{}`
        payload = payload or {}
        # Build the request and return json response
        return requests.put(
            '{}/{}/{}'.format(
                self.master, pyconsul.__consul_api_version__, resource),
            params=payload
        )