def Mutate(self, ops):
    """Add, update, or remove user lists.

    Args:
      ops: list Unique operations.

    Returns:
      tuple Mutated user lists.
    """
    method_name = 'mutateUserList'
    SanityCheck.ValidateTypes(((ops, list),))
    for op in ops:
      if 'operand' in op:
        AdWordsUtils.TransformUserListRuleOperands(op['operand'])
      SanityCheck.NewSanityCheck(self._wsdl_types_map, op, 'UserListOperation')

    if self._config['soap_lib'] == SOAPPY:
      new_ops = []
      for op in ops:
        new_ops.append(self._message_handler.PackVarAsXml(
            op, 'operations', self._wsdl_types_map, False, 'UserListOperation'))
      return self.__service.CallMethod(
          method_name.split(self.__class__.__name__.split('Service')[0])[0],
          (''.join(new_ops)))
    elif self._config['soap_lib'] == ZSI:
      new_ops = []
      for op in ops:
        new_ops.append(self._transformation.MakeZsiCompatible(
            op, 'UserListOperation', self._wsdl_types_map, self._web_services))
      request = eval('self._web_services.%sRequest()' % method_name)
      return self.__service.CallMethod(method_name,
                                       (({'operations': new_ops},)), 'UserList',
                                       self._loc, request)
  def _TakeActionOnSoapCall(self, method_name, args):
    """Gives the service a chance to take product-specific action on raw inputs.

    AdWords will support legacy xsi_typing for the BulkMutateJobService.

    Args:
      method_name: string The name of the SOAP operation being called.
      args: tuple The arguments passed into the SOAP operation.

    Returns:
      tuple The method arguments, possibly modified.
    """
    if (self._service_name == 'BulkMutateJobService' and
        method_name.lower() == 'mutate'):
      AdWordsUtils.TransformJobOperationXsi(args[0])
    elif (self._service_name == 'UserListService' and
          method_name.lower() == 'mutate'):
      if isinstance(args[0], (list, tuple)):
        for operation in args[0]:
          if isinstance(operation, dict) and 'operand' in operation:
            AdWordsUtils.TransformUserListRuleOperands(operation['operand'])
    return args