'Process sample data and update version specific links.'

def _update_links(self, sample_data):

    url_re = ((self._get_host() + '/v(2|2\\.1)/') + PROJECT_ID)
    new_url = ((self._get_host() + '/') + self.api_major_version)
    if self._project_id:
        new_url += ('/' + PROJECT_ID)
    updated_data = re.sub(url_re, new_url, sample_data)
    url_re = ((self._get_host() + '/') + PROJECT_ID)
    new_url = self._get_host()
    if self._project_id:
        new_url += ('/' + PROJECT_ID)
    updated_data = re.sub(url_re, new_url, updated_data)
    return updated_data
