class_docstr: Patch a submodule attribute of an object, by keeping all other submodules intact at all levels.
  
  Example::
  
      >>> import importlib
      >>> from datasets.load import dataset_module_factory
      >>> from datasets.streaming import patch_submodule, xjoin
      >>>
      >>> dataset_module = dataset_module_factory("snli")
      >>> snli_module = importlib.import_module(dataset_module.module_path)
      >>> patcher = patch_submodule(snli_module, "os.path.join", xjoin)
      >>> patcher.start()
      >>> assert snli_module.os.path.join is xjoin
code: def __init__(self, obj, target: str, new, attrs=None):
      self.obj = obj
      self.target = target
      self.new = new
      self.key = target.split(".")[0]
      self.original = {}
      self.attrs = attrs or []
  
file_path: datasets/src/datasets/utils/patching.py
imports: from importlib import import_module
  from .logging import get_logger
label_desc: Use image node_id 1 to create a new patch_submodule object  with example: obj = patch_submodule(obj, target, new, attrs)