# Path: picatrix/lib/error.py
# class Error(Exception):
# class ArgParserNonZeroStatus(Error):
# 
# Path: picatrix/lib/manager.py
# class Helper:
# class MagicManager:
#   MAGICS_DF_COLUMNS = ['name', 'description', 'line', 'cell', 'function']
#   def clear_helpers(cls):
#   def clear_magics(cls):
#   def deregister_helper(cls, helper_name: Text):
#   def deregister_magic(cls, magic_name: Text):
#   def get_helper(cls, helper_name: Text) -> Optional[Callable[..., Any]]:
#   def get_magic(cls, magic_name: Text) -> Callable[[Text, Text], Text]:
#   def get_helper_info(
#       cls,
#       as_pandas: Optional[bool] = True
#   ) -> Union[pandas.DataFrame, List[Tuple[Text, Text]]]:
#   def get_magic_info(
#       cls,
#       as_pandas: Optional[bool] = True
#   ) -> Union[pandas.DataFrame, List[Tuple[Text, Text]]]:
#   def register_helper(
#       cls, name: Text, helper: Any, typing_help: Dict[Text, Any]):
#   def register_magic(
#       cls,
#       function: Callable[[Text, Text], Text],
#       conditional: Callable[[], bool] = None):
#     def capture_output(function, name):
#       def wrapper(*args, **kwargs):
# 
# Path: picatrix/lib/state.py
# def state(refresh_state: bool = False):
#   """Property that returns a state object."""
#   # pylint: disable=global-statement
#   # Making sure we have only one state object.
#   global __state
# 
#   with _LOCK:
#     if refresh_state or __state is None:
#       __state = State()
# 
#     return __state
# 
# Path: picatrix/lib/utils.py
# def ask_question(question: Text, input_type: Optional[Any] = Text) -> Any:
# def clear_notebook_output():
# def ipython_bind_global(name: Text, value: Any) -> Any:
# def ipython_get_global(name: Text) -> Any:
# def ipython_remove_global(name: Text):


import argparse
import functools
import inspect
import types
import typing
from typing import Any, Callable, Dict, List, Optional, Text
  from typing import Protocol
  from typing_extensions import Protocol
from picatrix.lib import error, manager, state, utils
          dest='bindto',
          help='Bind the results to a variable instead of being returned.')
    except argparse.ArgumentError:
      pass

    try:
      self.argument_parser.add_argument(
          'data',
          nargs='?',
          help=self.argument_parser.storage.get('_data_help', ''))
    except argparse.ArgumentError:
      pass

    self.__doc__ = self.argument_parser.format_help()

  # pylint: disable=inconsistent-return-statements
  def __call__(self, line: Text, cell: Optional[Text] = None) -> Optional[Any]:
    line_magic = cell is None

    arguments = _parse_line_string(line)

    try:
      options = self.argument_parser.parse_args(arguments)
    except KeyError as e:
      print(
          (
              'Unable to parse arguments, with error: {0!s}.\n'
              'Correct usage is: {1:s}').format(
                  e, self.argument_parser.format_help()))
      return

# Path: picatrix/lib/error.py
# class Error(Exception):
# class ArgParserNonZeroStatus(Error):
# 
# Path: picatrix/lib/manager.py
# class Helper:
# class MagicManager:
#   MAGICS_DF_COLUMNS = ['name', 'description', 'line', 'cell', 'function']
#   def clear_helpers(cls):
#   def clear_magics(cls):
#   def deregister_helper(cls, helper_name: Text):
#   def deregister_magic(cls, magic_name: Text):
#   def get_helper(cls, helper_name: Text) -> Optional[Callable[..., Any]]:
#   def get_magic(cls, magic_name: Text) -> Callable[[Text, Text], Text]:
#   def get_helper_info(
#       cls,
#       as_pandas: Optional[bool] = True
#   ) -> Union[pandas.DataFrame, List[Tuple[Text, Text]]]:
#   def get_magic_info(
#       cls,
#       as_pandas: Optional[bool] = True
#   ) -> Union[pandas.DataFrame, List[Tuple[Text, Text]]]:
#   def register_helper(
#       cls, name: Text, helper: Any, typing_help: Dict[Text, Any]):
#   def register_magic(
#       cls,
#       function: Callable[[Text, Text], Text],
#       conditional: Callable[[], bool] = None):
#     def capture_output(function, name):
#       def wrapper(*args, **kwargs):
# 
# Path: picatrix/lib/state.py
# def state(refresh_state: bool = False):
#   """Property that returns a state object."""
#   # pylint: disable=global-statement
#   # Making sure we have only one state object.
#   global __state
# 
#   with _LOCK:
#     if refresh_state or __state is None:
#       __state = State()
# 
#     return __state
# 
# Path: picatrix/lib/utils.py
# def ask_question(question: Text, input_type: Optional[Any] = Text) -> Any:
# def clear_notebook_output():
# def ipython_bind_global(name: Text, value: Any) -> Any:
# def ipython_get_global(name: Text) -> Any:
# def ipython_remove_global(name: Text):


# Path: picatrix/lib/framework.py
import argparse
import functools
import inspect
import types
import typing
from typing import Any, Callable, Dict, List, Optional, Text
  from typing import Protocol
  from typing_extensions import Protocol
from picatrix.lib import error, manager, state, utils

          dest='bindto',
          help='Bind the results to a variable instead of being returned.')
    except argparse.ArgumentError:
      pass

    try:
      self.argument_parser.add_argument(
          'data',
          nargs='?',
          help=self.argument_parser.storage.get('_data_help', ''))
    except argparse.ArgumentError:
      pass

    self.__doc__ = self.argument_parser.format_help()

  # pylint: disable=inconsistent-return-statements
  def __call__(self, line: Text, cell: Optional[Text] = None) -> Optional[Any]:
    line_magic = cell is None

    arguments = _parse_line_string(line)

    try:
      options = self.argument_parser.parse_args(arguments)
    except KeyError as e:
      print(
          (
              'Unable to parse arguments, with error: {0!s}.\n'
              'Correct usage is: {1:s}').format(
                  e, self.argument_parser.format_help()))
      return

    except error.ArgParserNonZeroStatus: