Return a DER-encoded sequence

    Based on code from python-ecdsa (https://github.com/warner/python-ecdsa)
    by Brian Warner.  Subject to the MIT license.

def btc_tx_der_encode_sequence(*encoded_pieces):
    """
    Return a DER-encoded sequence

    Based on code from python-ecdsa (https://github.com/warner/python-ecdsa)
    by Brian Warner.  Subject to the MIT license.
    """
    # borrowed from python-ecdsa
    total_len = sum([len(p) for p in encoded_pieces])
    return b('\x30') + btc_tx_der_encode_length(total_len) + b('').join(encoded_pieces)