# Path: sciunit/base.py
# PLATFORM = sys.platform
# PYTHON_MAJOR_VERSION = sys.version_info.major
# class Config(dict):
# class Versioned(object):
# class SciUnit(Versioned):
# class TestWeighted(object):
# class SciUnitHandler(BaseHandler):
# class QuantitiesHandler(BaseHandler):
# class UnitQuantitiesHandler(BaseHandler):
#     def __init__(self, *args, **kwargs):
#     def path(self):
#     def path(self, val):
#     def __getitem__(self, key):
#     def get(self, key, default=None, update_from_disk=True):
#     def set(self, key, val):
#     def __setitem__(self, key, val):
#     def get_from_disk(self):
#     def create(self, data: dict = None) -> bool:
#     def load(self):
#     def save(self):
#     def get_repo(self, cached: bool = True) -> Repo:
#     def get_version(self, cached: bool = True) -> str:
#     def get_remote(self, remote_name: str = "origin", **kwargs) -> Remote:
#     def get_remote_url(self, remote: str = "origin", cached: bool = True) -> str:
#     def __init__(self):
#     def __getstate__(self) -> dict:
#     def properties(self, keys: list = None, exclude: list = None) -> dict:
#     def property_names(self) -> list:
#     def json(
#         self, add_props: bool = True, string: bool = True, unpicklable: bool = False, make_refs: bool = False) -> str:
#     def diff(self, other, add_props=False):
#     def hash(self, serialization: str = None) -> str:
#     def _class(self) -> dict:
#     def url(self) -> str:
#     def get_list_attr_with_bases(self, attr: str) -> list:
#     def weights(self) -> List[float]:
# def deep_exclude(state: dict, exclude: list) -> dict:
# def log(*args, **kwargs):
# def strip_html(html):
#     def flatten(self, obj, data):
#     def restore(self, data):
#     def simplify(self, d):
#     def flatten(self, obj, data):
#     def restore(self, data):
#     def flatten(self, obj, data):
#     def restore(self, data):


import contextlib
import functools
import hashlib
import importlib
import inspect
import os
import pkgutil
import re
import sys
import traceback
import unittest.mock
import warnings
import jsonpickle
import nbconvert
import nbformat
import sciunit
                import matplotlib as mpl
        import shutil
from datetime import datetime
from io import StringIO, TextIOWrapper
from pathlib import Path
from types import ModuleType
from typing import Any, Callable, List, TextIO, Tuple, Type, Union
from urllib.request import urlopen
from IPython.display import HTML, display
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
from quantities.dimensionality import Dimensionality
from quantities.quantity import Quantity
from .base import (  # noqa
    PLATFORM,
    PYTHON_MAJOR_VERSION,
    SciUnit,
    __version__,
    config,
    ipy,
    tkinter,
)
        from importlib.machinery import SourceFileLoader
        from importlib import import_module
        """Loads a notebook file into memory.

        Args:
            name (str): name of the notebook file.

        Returns:
            Tuple[nbformat.NotebookNode, Union[str, Path]]: The notebook that was read and the path to the notebook file.
        """

        # with open(self.get_path('%s.ipynb' % name)) as f:
        #    nb = nbformat.read(f, as_version=4)
        file_path = self.get_path("%s.ipynb" % name)

        with open(file_path) as f:
            nb = nbformat.read(f, as_version=4)
        return nb, file_path

    def run_notebook(
        self, nb: nbformat.NotebookNode, file_path: Union[str, Path]
    ) -> None:
        """Runs a loaded notebook file.

        Args:
            nb (nbformat.NotebookNode): The notebook that was loaded.
            f (Union[str, Path]): The path to the notebook file.

        Raises:
            Exception: The exception that is thrown when running the notebook.
        """


# Path: sciunit/base.py
# PLATFORM = sys.platform
# PYTHON_MAJOR_VERSION = sys.version_info.major
# class Config(dict):
# class Versioned(object):
# class SciUnit(Versioned):
# class TestWeighted(object):
# class SciUnitHandler(BaseHandler):
# class QuantitiesHandler(BaseHandler):
# class UnitQuantitiesHandler(BaseHandler):
#     def __init__(self, *args, **kwargs):
#     def path(self):
#     def path(self, val):
#     def __getitem__(self, key):
#     def get(self, key, default=None, update_from_disk=True):
#     def set(self, key, val):
#     def __setitem__(self, key, val):
#     def get_from_disk(self):
#     def create(self, data: dict = None) -> bool:
#     def load(self):
#     def save(self):
#     def get_repo(self, cached: bool = True) -> Repo:
#     def get_version(self, cached: bool = True) -> str:
#     def get_remote(self, remote_name: str = "origin", **kwargs) -> Remote:
#     def get_remote_url(self, remote: str = "origin", cached: bool = True) -> str:
#     def __init__(self):
#     def __getstate__(self) -> dict:
#     def properties(self, keys: list = None, exclude: list = None) -> dict:
#     def property_names(self) -> list:
#     def json(
#         self, add_props: bool = True, string: bool = True, unpicklable: bool = False, make_refs: bool = False) -> str:
#     def diff(self, other, add_props=False):
#     def hash(self, serialization: str = None) -> str:
#     def _class(self) -> dict:
#     def url(self) -> str:
#     def get_list_attr_with_bases(self, attr: str) -> list:
#     def weights(self) -> List[float]:
# def deep_exclude(state: dict, exclude: list) -> dict:
# def log(*args, **kwargs):
# def strip_html(html):
#     def flatten(self, obj, data):
#     def restore(self, data):
#     def simplify(self, d):
#     def flatten(self, obj, data):
#     def restore(self, data):
#     def flatten(self, obj, data):
#     def restore(self, data):


# Path: sciunit/utils.py
import contextlib
import functools
import hashlib
import importlib
import inspect
import os
import pkgutil
import re
import sys
import traceback
import unittest.mock
import warnings
import jsonpickle
import nbconvert
import nbformat
import sciunit
                import matplotlib as mpl
        import shutil
from datetime import datetime
from io import StringIO, TextIOWrapper
from pathlib import Path
from types import ModuleType
from typing import Any, Callable, List, TextIO, Tuple, Type, Union
from urllib.request import urlopen
from IPython.display import HTML, display
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
from quantities.dimensionality import Dimensionality
from quantities.quantity import Quantity
from .base import (  # noqa
    PLATFORM,
    PYTHON_MAJOR_VERSION,
    SciUnit,
    __version__,
    config,
    ipy,
    tkinter,
)
        from importlib.machinery import SourceFileLoader
        from importlib import import_module

        """Loads a notebook file into memory.

        Args:
            name (str): name of the notebook file.

        Returns:
            Tuple[nbformat.NotebookNode, Union[str, Path]]: The notebook that was read and the path to the notebook file.
        """

        # with open(self.get_path('%s.ipynb' % name)) as f:
        #    nb = nbformat.read(f, as_version=4)
        file_path = self.get_path("%s.ipynb" % name)

        with open(file_path) as f:
            nb = nbformat.read(f, as_version=4)
        return nb, file_path

    def run_notebook(
        self, nb: nbformat.NotebookNode, file_path: Union[str, Path]
    ) -> None:
        """Runs a loaded notebook file.

        Args:
            nb (nbformat.NotebookNode): The notebook that was loaded.
            f (Union[str, Path]): The path to the notebook file.

        Raises:
            Exception: The exception that is thrown when running the notebook.
        """


        if PYTHON_MAJOR_VERSION == 3: