def METHOD_NAME(cls, layers: List[Layer], cost_metric: CostMetric, svd_lib_ref, svd_type=pymo.TYPE_SINGLE):
    """
    Configure layers with the pymo svd library
    :param layers: List of layers to configure
    :param cost_metric: Cost metric to use
    :param svd_lib_ref: Reference to pymo instance
    :param svd_type: Type of SVD to perform Single or Successive. Defaults to Single
    :return:
    """
    # Set the pymo cost metric
    svd_lib_ref.SetCostMetric(cls._get_pymo_cost_metric(cost_metric))
    # Set up the layer attributes for each Conv2D/Linear layer
    for layer in layers:
        attr = pymo.LayerAttributes()
        attr.layerType = cls._get_pymo_layer_type(layer.module)
        attr.mode = svd_type
        conv_parameters = layer.module.get_weights()
        bias_present = False
        if len(conv_parameters) > 1:
            bias_present = True
        weight_shape = conv_parameters[0].shape
        weights = conv_parameters[0]
        output_dims = layer.module.output_shape
        if isinstance(layer.module, tf.keras.layers.Conv2D):
            # TF Conv weight order [KH,KW,ID,OD]
            # SVD expects weight matrix of the form [output_channels, input_channels, kernel_height, kernel_width]
            attr.shape = [weight_shape[3], weight_shape[2], weight_shape[0], weight_shape[1]]
            # activation shape : [height, width]
            attr.activation_dims = (output_dims[1], output_dims[2])         # (H,W)
            # CONV weights are stored in the order {H,W,I,O} in Tensorflow
            # Re-order them to the form {O,I,H,W}
            weights = np.transpose(weights, (3, 2, 0, 1))
        elif isinstance(layer.module, tf.keras.layers.Dense):
            # TF FC weight order [ID,OD], SVD expects [OD,ID]
            # weight shape : [output_channels, input_channels, 1, 1]
            attr.shape = [weight_shape[1], weight_shape[0], 1, 1]
            # activation shape : [height, width]
            attr.activation_dims = (1, 1)
            # Reorder in [OD,ID] from [ID,OD]
            weights = np.transpose(weights, (1, 0))
        else:
            # raise error if layer is not Con2D or Linear/Dense
            raise AssertionError
        params = [weights.flatten()]
        if bias_present:
            bias = conv_parameters[1]
            params.append(bias.flatten())
        attr.blobs = params
        # Save the attributes for this layer
        logger.debug("Storing attributes for layer: %s", format(layer.name))
        svd_lib_ref.StoreLayerAttributes(str(layer.name), attr)