'Updates the ticket on ZenDesk.'

def update(self, ticket, status=None, comment_body='', comment_is_public=False, tag_list=None):

    if comment_body:
        comment_json = {'public': comment_is_public, 'body': comment_body}
    else:
        comment_json = {}
    ticket_updated_json = {'ticket': {'comment': comment_json, 'status': (status or ticket['status']), 'tags': (tag_list or ticket['tags'])}}
    timer = g.stats.get_timer('providers.zendesk.ticket_update')
    timer.start()
    response = requests.put(('%s/api/v2/tickets/%s.json' % (g.live_config['ticket_base_url'], ticket['id'])), auth=(('%s/token' % g.secrets['zendesk_user']), g.secrets['zendesk_api_key']), headers={'content-type': 'application/json'}, data=json.dumps(ticket_updated_json))
    timer.stop()
    if (response.status_code != 200):
        g.log.error(('ZENDESK_UPDATE_ERROR:    code:    %s    msg:    %s' % (response.status_code, response.text)))
        return None
    return json.loads(response.content)['ticket']
