code: def test_non_master_branch(src_path=None, target_path=None):
      src_path = Path(src_path)
      target_path = Path(target_path)
  
      ds_a = Dataset(src_path).create()
      # Rename rather than checking out another branch so that the default branch
      # doesn't exist in any state.
      ds_a.repo.call_git(["branch", "-m", DEFAULT_BRANCH, "other"])
      (ds_a.pathobj / "afile").write_text("content")
      sa = ds_a.create("sub-a")
      sa.repo.checkout("other-sub", ["-b"])
      ds_a.create("sub-b")
  
      ds_a.save()
      ds_a.create_sibling(
          name="sib",
          recursive=True,
          sshurl="ssh://datalad-test" + str(target_path / "b"),
      )
      ds_a.push(to="sib", data="anything")
  
      ds_b = Dataset(target_path / "b")
  
      def get_branch(repo):
          return (
              repo.get_corresponding_branch()
              or repo.get_active_branch()
          )
  
      # The HEAD for the create-sibling matches what the branch was in
      # the original repo.
      eq_(get_branch(ds_b.repo), "other")
      ok_((ds_b.pathobj / "afile").exists())
  
      eq_(
          get_branch(Dataset(target_path / "b" / "sub-a").repo),
          "other-sub",
      )
      eq_(
          get_branch(Dataset(target_path / "b" / "sub-b").repo),
          DEFAULT_BRANCH,
      )
  
imports: import logging
  import os
  import stat
  import sys
  from os import chmod
  from os.path import basename, exists
  from os.path import join
  import pytest
  from datalad.api import create_sibling, install, push
  from datalad.cmd import StdOutErrCapture
  from datalad.cmd import WitlessRunner
  from datalad.distribution.create_sibling import _RunnerAdapter
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CommandError, InsufficientArgumentsError
  from datalad.support.gitrepo import GitRepo
  from datalad.support.network import urlquote
  from datalad.tests.utils_testdatasets import _mk_submodule_annex
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_dict_equal, assert_false, assert_in, assert_in_results, assert_no_errors_logged, assert_not_equal, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_status, create_tree, eq_, get_mtimes_and_digests, get_ssh_port, known_failure_windows, ok_, ok_endswith, ok_file_has_content, ok_file_under_git, skip_if_on_windows, skip_if_root, skip_ssh, slow, swallow_logs, with_tempfile, with_testsui
  from datalad.utils import Path, _path_, chpwd, on_windows
  from ..dataset import Dataset
label_desc: Use image node_id 19 for calling a global function with example usage: test_non_master_branch(src_path, target_path) and returns: unknown