def METHOD_NAME(
    config: Config,
    targets: Iterable[str],
    output_dir: Optional[P] = None,
    search_paths=None,
    fake_refs=False,
    reveal=False,
):
    if not output_dir:
        output_dir = config.work_dir
    if not search_paths:
        search_paths = []
    search_paths = search_paths + [
        config.work_dir,
        __install_dir__,
    ]
    reset_reclass_cache()
    refController = RefController(config.refs_dir)
    if fake_refs:
        refController.register_backend(FakeVaultBackend())
    click.secho("Compiling catalog...", bold=True)
    cached.args["compile"] = ArgumentCache(
        inventory_path=config.inventory.inventory_dir,
        yaml_multiline_string_style="literal",
        yaml_dump_null_as_empty=False,
    )
    kapitan_targets.compile_targets(
        inventory_path=config.inventory.inventory_dir,
        search_paths=search_paths,
        output_path=output_dir,
        targets=targets,
        parallel=4,
        labels=None,
        ref_controller=refController,
        verbose=config.trace,
        prune=False,
        indent=2,
        reveal=reveal,
        cache=False,
        cache_paths=None,
        fetch=config.fetch_dependencies,
        # We always want to force-fetch when we want to fetch dependencies
        force_fetch=config.fetch_dependencies,
        validate=False,
        schemas_path=config.work_dir / "schemas",
        jinja2_filters=defaults.DEFAULT_JINJA2_FILTERS_PATH,
    )