<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def claim(ctx, vestingid, account, amount):
 """ Claim funds from the vesting balance """

    vesting = Vesting(vestingid)
    if amount:
        amount = Amount(float(amount), "BTS")
    else:
        amount = vesting.claimable
    print_tx(
        ctx.bitshares.vesting_balance_withdraw(
            vesting["id"], amount=amount, account=vesting["owner"]
        )
    )