code: def pop_recursive(d, key, default=None):
      """dict.pop(key) where `key` is a `.`-delimited list of nested keys.
      >>> d = {'a': {'b': 1, 'c': 2}}
      >>> pop_recursive(d, 'a.c')
      2
      >>> d
      {'a': {'b': 1}}
      """
      nested = key.split(".")
      current = d
      for k in nested[:-1]:
          if hasattr(current, "get"):
              current = current.get(k, {})
          else:
              return default
      if not hasattr(current, "pop"):
          return default
      return current.pop(nested[-1], default)
  
file_path: seaborn/doc/tools/nb_to_doc.py
imports: import os
  import sys
  import nbformat
  from nbconvert import RSTExporter
  from nbconvert.preprocessors import ExecutePreprocessor, TagRemovePreprocessor, ExtractOutputPreprocessor
  from traitlets.config import Config
label_desc: Use image node_id 1 for calling a global function with example usage: pop_recursive(d, key, default) and returns: current, default, default