def METHOD_NAME(amount):
    """A comparison function that sorts by currency first.
    Args:
      amount: An instance of Amount.
    Returns:
      A sort key, composed of the currency first and then the number.
    """
    return (amount.currency, amount.number)