<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def checkout(cls, order, **kwargs):
 """Checkout cart. Checkout cart, Making an order. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True :param async bool :param Order order: Required order details. (required) :return: Order If the method is called asynchronously, returns the request thread. """

        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return cls._checkout_with_http_info(order, **kwargs)
        else:
            (data) = cls._checkout_with_http_info(order, **kwargs)
            return data