code: def update_variable_group(self, group, project, group_id):
          
          route_values = {}
          if project is not None:
              route_values['project'] = self._serialize.url('project', project, 'str')
          if group_id is not None:
              route_values['groupId'] = self._serialize.url('group_id', group_id, 'int')
          content = self._serialize.body(group, 'VariableGroupParameters')
          response = self._send(http_method='PUT',
                                location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc',
                                version='5.1-preview.1',
                                route_values=route_values,
                                content=content)
          return self._deserialize('VariableGroup', response)
docs: UpdateVariableGroup.
          [Preview API] Update a variable group.
          :param :class:`<VariableGroupParameters> <azure.devops.v5_1.task_agent.models.VariableGroupParameters>` group: Variable group to update.
          :param str project: Project ID or project name
          :param int group_id: Id of the variable group to update.
          :rtype: :class:`<VariableGroup> <azure.devops.v5_1.task-agent.models.VariableGroup>`