code: def test_gh1426(origin_path=None, target_path=None):
      # set up a pair of repos, one the published copy of the other
      origin = Dataset(origin_path).create()
      target = mk_push_target(
          origin, "target", target_path, annex=True, bare=False
      )
      origin.push(to="target")
      assert_repo_status(origin.path)
      assert_repo_status(target.path)
      eq_(
          origin.repo.get_hexsha(DEFAULT_BRANCH),
          target.get_hexsha(DEFAULT_BRANCH),
      )
  
      # gist of #1426 is that a newly added subdataset does not cause the
      # superdataset to get published
      origin.create("sub")
      assert_repo_status(origin.path)
      neq_(
          origin.repo.get_hexsha(DEFAULT_BRANCH),
          target.get_hexsha(DEFAULT_BRANCH),
      )
      # now push
      res = origin.push(to="target")
      assert_result_count(
          res,
          1,
          status="ok",
          type="dataset",
          path=origin.path,
          action="publish",
          target="target",
          operations=["fast-forward"],
      )
      eq_(
          origin.repo.get_hexsha(DEFAULT_BRANCH),
          target.get_hexsha(DEFAULT_BRANCH),
      )
  
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 10 for calling a global function with example usage: test_gh1426(origin_path, target_path) without return types