code: def test_push_wanted(srcpath=None, dstpath=None):
      src = Dataset(srcpath).create()
      (src.pathobj / "data.0").write_text("0")
      (src.pathobj / "secure.1").write_text("1")
      (src.pathobj / "secure.2").write_text("2")
      src.save()
  
      # Dropping a file to mimic a case of simply not having it locally (thus not
      # to be "pushed")
      src.drop("secure.2", reckless="kill")
  
      # Annotate sensitive content, actual value "verysecure" does not matter in
      # this example
      src.repo.set_metadata(
          add={"distribution-restrictions": "verysecure"},
          files=["secure.1", "secure.2"],
      )
  
      src.create_sibling(
          dstpath,
          annex_wanted="not metadata=distribution-restrictions=*",
          name="target",
      )
      # check that wanted is obeyed, since set in sibling configuration
      res = src.push(to="target")
      assert_in_results(
          res,
          action="copy",
          path=str(src.pathobj / "data.0"),
          status="ok",
      )
      for p in ("secure.1", "secure.2"):
          assert_not_in_results(res, path=str(src.pathobj / p))
      assert_status("notneeded", src.push(to="target"))
  
      # check the target to really make sure
      dst = Dataset(dstpath)
      # normal file, yes
      eq_((dst.pathobj / "data.0").read_text(), "0")
      # secure file, no
      if dst.repo.is_managed_branch():
          neq_((dst.pathobj / "secure.1").read_text(), "1")
      else:
          assert_raises(
              FileNotFoundError, (dst.pathobj / "secure.1").read_text
          )
  
      # reset wanted config, which must enable push of secure file
      src.repo.set_preferred_content("wanted", "", remote="target")
      res = src.push(to="target")
      assert_in_results(res, path=str(src.pathobj / "secure.1"))
      eq_((dst.pathobj / "secure.1").read_text(), "1")
  
imports: import logging
  import os
  import pytest
  from datalad.core.distributed.clone import Clone
  from datalad.core.distributed.push import Push
  from datalad.distribution.dataset import Dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import IncompleteResultsError, InsufficientArgumentsError
  from datalad.support.external_versions import external_versions
  from datalad.support.gitrepo import GitRepo
  from datalad.support.network import get_local_file_url
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_false, assert_in, assert_in_results, assert_not_in, assert_not_in_results, assert_raises, assert_repo_status, assert_result_count, assert_status, eq_, known_failure_githubci_osx, known_failure_githubci_win, neq_, ok_, ok_file_has_content, serve_path_via_http, skip_if_adjusted_branch, skip_if_on_windows, skip_ssh, slow, swallow_logs, with_tempfile, with_tree
  from datalad.utils import Path, chpwd, path_startswith, swallow_outputs
label_desc: Use image node_id 14 for calling a global function with example usage: test_push_wanted(srcpath, dstpath) without return types