a nice pattern here is

```python
transaction.invoice.status = {
    self.TYPE_CHARGE: InvoiceModel.STATUS_PROCESS_FAILED,
    self.TYPE_REFUND: InvoiceModel.STATUS_REFUND_FAILED,
}[transaction.transaction_type]
```

also as an aside, does it make sense to have the type of the object in the name? why not `InvoiceModel.statuses.PROCESS_FAILED`?  it seems less verbose.