def METHOD_NAME(cls, model: tf.keras.Model, eval_callback: EvalFunction, eval_iterations: int,
                            cost_metric: CostMetric, params: SpatialSvdParameters,
                            bokeh_session: BokehServerSession = None) -> CompressionAlgo:
    """
    Factory method to construct SpatialSvdCompressionAlgo
    :param model: Keras model to compress
    :param eval_callback: Evaluation callback for the model
    :param eval_iterations: Evaluation iterations
    :param cost_metric: Cost metric (mac or memory)
    :param params: Spatial SVD compression parameters
    :param bokeh_session: The Bokeh Session to display plots
    :return: An instance of SpatialSvdCompressionAlgo
    """
    # pylint: disable=too-many-arguments
    # pylint: disable=too-many-locals
    # Rationale: Factory functions unfortunately need to deal with a lot of parameters
    # Create a layer database
    layer_db = LayerDatabase(model)
    use_cuda = False
    # Create a pruner
    pruner = SpatialSvdPruner()
    cost_calculator = SpatialSvdCostCalculator()
    comp_ratio_rounding_algo = RankRounder(params.multiplicity, cost_calculator)
    # Create a comp-ratio selection algorithm
    if params.mode == SpatialSvdParameters.Mode.auto:
        greedy_params = params.mode_params.greedy_params
        comp_ratio_select_algo = GreedyCompRatioSelectAlgo(layer_db, pruner, cost_calculator, eval_callback,
                                                           eval_iterations, cost_metric,
                                                           greedy_params.target_comp_ratio,
                                                           greedy_params.num_comp_ratio_candidates,
                                                           greedy_params.use_monotonic_fit,
                                                           greedy_params.saved_eval_scores_dict,
                                                           comp_ratio_rounding_algo, use_cuda,
                                                           bokeh_session=bokeh_session)
        layer_selector = ConvNoDepthwiseLayerSelector()
        modules_to_ignore = params.mode_params.modules_to_ignore
    else:
        # Convert (module,comp-ratio) pairs to (layer,comp-ratio) pairs
        layer_comp_ratio_pairs = cls._get_layer_pairs(layer_db, params.mode_params.list_of_module_comp_ratio_pairs)
        comp_ratio_select_algo = ManualCompRatioSelectAlgo(layer_db,
                                                           layer_comp_ratio_pairs,
                                                           comp_ratio_rounding_algo, cost_metric=cost_metric)
        layer_selector = ManualLayerSelector(layer_comp_ratio_pairs)
        modules_to_ignore = []
    # Create the overall Spatial SVD compression algorithm
    spatial_svd_algo = CompressionAlgo(layer_db, comp_ratio_select_algo, pruner, eval_callback,
                                       layer_selector, modules_to_ignore, cost_calculator, use_cuda)
    return spatial_svd_algo