def _update_management_header(self, request):
        """
        Add additional headers for management.
        """

        if ['PUT', 'POST', 'MERGE', 'DELETE'] in request.method:
            request.headers['Content-Length'] = str(len(request.body))

        # append additional headers base on the service
        #  request.headers.append(('x-ms-version', X_MS_VERSION))

        # if it is not GET or HEAD request, must set content-type.
        if request.method not in ['GET', 'HEAD']:
            for key in request.headers:
                if 'content-type' == key.lower():
                    break
            else:
                request.headers['Content-Type'] = 'application/xml'

        return request.headers
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/azure.py/AzureNodeDriver._update_management_header/swapped operands of `in`