<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def withdraw(self, amount, currency, payment_method_id):
 """ Withdraw funds to a payment method. See AuthenticatedClient.get_payment_methods() to receive information regarding payment methods. Args: amount (Decimal):
 The amount to withdraw. currency (str):
 Currency type (eg. 'BTC') payment_method_id (str):
 ID of the payment method. Returns: dict: Withdraw details. Example:: { "id":"593533d2-ff31-46e0-b22e-ca754147a96a", "amount": "10.00", "currency": "USD", "payout_at": "2016-08-20T00:31:09Z" } """

        params = {'amount': amount,
                  'currency': currency,
                  'payment_method_id': payment_method_id}
        return self._send_message('post', '/withdrawals/payment-method',
                                  data=json.dumps(params))