def METHOD_NAME(
    url, init_and_sync, rpm_repository_version_api, bindings_cfg, http_get
):
    """
    Sync a repository and test that content of any type cannot be removed directly.
    - advisory
    - distribution_tree
    - modulemd
    - modulemd_defaults
    - package
    - packagecategory
    - packageenvironment
    - packagegroup
    - packagelangpacks
    - repo metadata
    """
    repo, _ = init_and_sync(url=url, policy="on_demand")
    # Test remove content by types contained in repository.
    version = rpm_repository_version_api.read(repo.latest_version_href)
    async def _delete_request(url, **kwargs):
        async with aiohttp.ClientSession(raise_for_status=False) as session:
            async with session.delete(url, **kwargs) as response:
                return response.status
    # iterate over content filtered by repository versions
    for content_units in version.content_summary.added.values():
        auth = aiohttp.BasicAuth(bindings_cfg.username, bindings_cfg.password)
        url = urljoin(bindings_cfg.host, content_units["href"])
        response = json.loads(http_get(url, auth=auth).decode())
        # iterate over particular content units and issue delete requests
        for content_unit in response["results"]:
            url = urljoin(bindings_cfg.host, content_unit["pulp_href"])
            status = asyncio.run(_delete_request(url, auth=auth))
            # check that '405' (method not allowed) is returned
            assert status == 405