@classmethod
def spend(cls, txo: 'BaseOutput') ->'BaseInput':
    """ Create an input to spend the output."""
    assert txo.script.is_pay_pubkey_hash, 'Attempting to spend unsupported output.'
    script = cls.script_class.redeem_pubkey_hash(cls.NULL_SIGNATURE, cls.
        NULL_PUBLIC_KEY)
    return cls(txo.ref, script)
