code: def test_notebook_metadata_jupyter(mocked_module, notebook):
      with mock.patch(
          "ipykernel.connect.get_connection_file"
      ) as ipyconnect:
          ipyconnect.return_value = "kernel-12345.json"
          serverapp = mocked_module("jupyter_server.serverapp")
          serverapp.list_running_servers.return_value = [
              {"url": notebook.base_url, "notebook_dir": "/test"}
          ]
          with mock.patch.object(
              wandb.jupyter.requests,
              "get",
              lambda *args, **kwargs: mock.MagicMock(
                  json=lambda: [
                      {
                          "kernel": {"id": "12345"},
                          "notebook": {
                              "name": "test.ipynb",
                              "path": "test.ipynb",
                          },
                      }
                  ]
              ),
          ):
              meta = wandb.jupyter.notebook_metadata(False)
              assert meta == {
                  "path": "test.ipynb",
                  "root": "/test",
                  "name": "test.ipynb",
              }
  
imports: import json
  import os
  import pathlib
  import platform
  import subprocess
  import sys
  from unittest import mock
  import pytest
  import wandb
  import wandb.jupyter
  import wandb.sdk.lib.apikey
  import wandb.util
label_desc: Use image node_id 5 for calling a global function with example usage: test_notebook_metadata_jupyter(mocked_module, notebook) without return types