def get_alt_svms(svms, classes, target_class):
  """
  Find alternative SVMs (e.g., for target class 0, find the svms classifying 0 against 1, and 0 against 2).

  Parameters
  ----------
  svms : list
      List of eTree.Element objects describing the different one-to-one support vector machines in the PMML.

  classes : numpy.array
      The classes to be predicted by the model.

  target_class : str
      The target class.

  Returns
  -------
  alt_svms : list
      List of eTree.Elements filtered to only include SVMs comparing the target class against alternate classes.

  """
  # Noop for regression
  if classes[0] is None:
    return svms

  alt_svms = [
    svm for svm in svms
    if svm.get('targetCategory') == str(target_class) or svm.get('alternateTargetCategory') == str(target_class)
  ]

  # Sort svms based on target class order
  alt_svms = [
    next(svm for svm in alt_svms if svm.get('targetCategory') == str(c) or svm.get('alternateTargetCategory') == str(c))
    for c in set(classes).difference({target_class})
  ]

  return alt_svms