@staticmethod
def _start_repl(api):
    """
        Starts the REPL.
        """
    banner = (
        """IOTA API client for {uri} ({testnet}) initialized as variable `api`.
Type `help(api)` for list of API commands."""
        .format(testnet='testnet' if api.testnet else 'mainnet', uri=api.
        adapter.get_uri()))
    scope_vars = {'api': api}
    try:
        import IPython
    except ImportError:
        from code import InteractiveConsole
        InteractiveConsole(locals=scope_vars).interact(banner, '')
    else:
        print(banner)
        IPython.start_ipython(argv=[], user_ns=scope_vars)
