return tx fee from tx size in bytes

def calculate_tx_fee(tx_size: int) -> Decimal:
    '''return tx fee from tx size in bytes'''

    per_kb_cost = 0.01
    min_fee = Decimal(0.001)

    fee = Decimal((tx_size / 1000) * per_kb_cost)

    if fee <= min_fee:
        return min_fee
    else:
        return fee