def METHOD_NAME(
    rule_runner: RuleRunner, include_metadata: bool, include_resources: bool, include_files: bool
) -> None:
    rule_runner.write_files(
        {
            "BUILD": dedent(
                """\
                helm_chart(name='mychart', dependencies=[':resources', ':files'])
                resources(name="resources", sources=['*.xml'])
                files(name="files", sources=['*.txt'])
                """
            ),
            "Chart.yaml": HELM_CHART_FILE,
            "values.yaml": HELM_VALUES_FILE,
            "templates/_helpers.tpl": HELM_TEMPLATE_HELPERS_FILE,
            "templates/service.yaml": K8S_SERVICE_TEMPLATE,
            "resource.xml": "",
            "file.txt": "",
        }
    )
    address = Address("", target_name="mychart")
    tgt = rule_runner.get_target(address)
    source_files = rule_runner.request(
        HelmChartSourceFiles,
        [
            HelmChartSourceFilesRequest.create(
                tgt,
                include_metadata=include_metadata,
                include_resources=include_resources,
                include_files=include_files,
            )
        ],
    )
    if include_metadata:
        assert "Chart.yaml" in source_files.snapshot.files
    if include_resources:
        assert "resource.xml" in source_files.snapshot.files
    if include_files:
        assert "file.txt" in source_files.snapshot.files
        assert "file.txt" in source_files.unrooted_files