@staticmethod
def handle_swagger_array(item_swagger_type, shape):
    """
        Converts a dtype type representing a sub-array to a swagger valid type

        :param item_swagger_type:
        :type item_swagger_type: dict
        :param shape:
        :type shape: numpy.dtype.shape
        :return: the converted swagger type.
        :rtype: dict
        """
    swag_array = {'type': 'array', 'items': item_swagger_type}
    if len(shape) > 1:
        for dim in range(len(shape) - 1):
            swag_array = {'type': 'array', 'items': swag_array}
    return swag_array
