code: def create_checkpoint(
      backend: NeptuneBackend, notebook_id: str, notebook_path: str
  ):
      if is_ipython():
          import IPython
  
          ipython = IPython.core.getipython.get_ipython()
          execution_count = -1
          if ipython.kernel is not None:
              execution_count = ipython.kernel.execution_count
          with _checkpoints_lock:
              if execution_count in _checkpoints:
                  return _checkpoints[execution_count]
  
              checkpoint = backend.create_checkpoint(
                  notebook_id, notebook_path
              )
              if ipython is not None and ipython.kernel is not None:
                  send_checkpoint_created(
                      notebook_id=notebook_id,
                      notebook_path=notebook_path,
                      checkpoint_id=checkpoint,
                  )
                  _checkpoints[execution_count] = checkpoint
              return checkpoint
  
imports: import logging
  import threading
  from neptune.internal.backends.neptune_backend import NeptuneBackend
  from neptune.internal.notebooks.comm import send_checkpoint_created
  from neptune.internal.utils import is_ipython
label_desc: Use image node_id 1 for calling a global function with example usage: create_checkpoint(backend, notebook_id, notebook_path) and returns: checkpoint, _checkpoints