def _parse_kwargs(kwargs):
    """
    Extract kwargs for layout and placement functions. Leave the remaining ones for minorminer.find_embedding().
    """
    layout_kwargs = {}
    # For the layout object
    if "dim" in kwargs:
        layout_kwargs["dim"] = kwargs.pop("dim")
    if "center" in kwargs:
        layout_kwargs["center"] = kwargs.pop("center")
    if "scale" in kwargs:
        layout_kwargs["scale"] = kwargs.pop("scale")

    placement_kwargs = {}
    # For the placement object
    if "scale_ratio" in kwargs:
        placement_kwargs["scale_ratio"] = kwargs.pop("scale_ratio")
    # For closest strategy
    if "subset_size" in kwargs:
        placement_kwargs["subset_size"] = kwargs.pop("subset_size")
    if "num_neighbors" in kwargs:
        placement_kwargs["num_neighbors"] = kwargs.pop("num_neighbors")

    return layout_kwargs, placement_kwargs