code: def test_to_options_from_gitpython():
      """Imported from GitPython and modified.
  
      Original copyright:
          Copyright (C) 2008, 2009 Michael Trier and contributors
      Original license:
          BSD 3-Clause "New" or "Revised" License
      """
      eq_(["-s"], to_options(**{"s": True}))
      eq_(["-s", "5"], to_options(**{"s": 5}))
      eq_([], to_options(**{"s": None}))
  
      eq_(["--max-count"], to_options(**{"max_count": True}))
      eq_(["--max-count=5"], to_options(**{"max_count": 5}))
      eq_(["--max-count=0"], to_options(**{"max_count": 0}))
      eq_([], to_options(**{"max_count": None}))
  
      # Multiple args are supported by using lists/tuples
      eq_(
          ["-L", "1-3", "-L", "12-18"],
          to_options(**{"L": ("1-3", "12-18")}),
      )
      eq_(["-C", "-C"], to_options(**{"C": [True, True, None, False]}))
  
      # order is undefined
      res = to_options(**{"s": True, "t": True})
      eq_({"-s", "-t"}, set(res))
  
imports: import logging
  import os
  import os.path
  import sys
  import pytest
  from datalad import get_encoding_info
  from datalad.cmd import StdOutCapture, StdOutErrCapture, WitlessRunner
  from datalad.support.exceptions import CommandError, FileNotInRepositoryError, InvalidGitRepositoryError, NoSuchPathError, PathKnownToRepositoryError
  from datalad.support.external_versions import external_versions
  from datalad.support.gitrepo import GitRepo, _normalize_path, normalize_paths, to_options
  from datalad.support.sshconnector import get_connection_hash
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_cwd_unchanged, assert_equal, assert_false, assert_in, assert_in_results, assert_is_instance, assert_not_equal, assert_not_in, assert_raises, assert_repo_status, assert_true, create_tree, eq_, get_most_obscure_supported_name, integration, neq_, ok_, skip_if_no_network, skip_if_on_windows, skip_nomultiplex_ssh, slow, swallow_logs, with_tempfile, with_tree, xfail_buggy_annex_info
  from datalad.utils import Path, chpwd, getpwd, on_windows, rmtree
label_desc: Use image node_id 33 for calling a global function with example usage: test_to_options_from_gitpython() without return types