'Creates account DB object to be stored in the DB by create or update.
May be overridden to store additional data'

def _populate_account(self, account, account_type_id, name, active, third_party, notes, identifier, custom_fields=None):

    account.name = name
    account.identifier = self.sanitize_account_identifier(identifier)
    account.notes = notes
    account.active = active
    account.third_party = third_party
    account.account_type_id = account_type_id
    self._update_custom_fields(account, custom_fields)
    return account
