code: def make_subrepo(dir_: TmpDir, scm, config=None):
      dir_.mkdir(parents=True, exist_ok=True)
      with dir_.chdir():
          dir_.scm = scm
          dir_.init(dvc=True, subdir=True)
          if config:
              dir_.add_remote(config=config)
  
imports: import os
  import pathlib
  import sys
  from contextlib import contextmanager
  from functools import partialmethod
  from dvc.utils import serialize
label_desc: Use image node_id 1 for calling a global function with example usage: make_subrepo(dir_, scm, config) without return types