'Create a new client'

@Slot()
@Slot(bool)
@Slot(str)
@Slot(bool, str)
def create_new_client(self, give_focus=True, filename=''):

    self.master_clients += 1
    client_id = dict(int_id=to_text_string(self.master_clients), str_id='A')
    cf = self._new_connection_file()
    client = ClientWidget(self, id_=client_id, history_filename=get_conf_path('history.py'), config_options=self.config_options(), additional_options=self.additional_options(), interpreter_versions=self.interpreter_versions(), connection_file=cf, menu_actions=self.menu_actions)
    self.add_tab(client, name=client.get_name(), filename=filename)
    if (cf is None):
        error_msg = _('The    directory    {}    is    not    writable    and    it    is    required    to    create    IPython    consoles.    Please    make    it    writable.').format(jupyter_runtime_dir())
        client.show_kernel_error(error_msg)
        return
    if (not CONF.get('main_interpreter', 'default')):
        pyexec = CONF.get('main_interpreter', 'executable')
        ipykernel_present = programs.is_module_installed('ipykernel', interpreter=pyexec)
        if (not ipykernel_present):
            client.show_kernel_error(_("Your    Python    environment    or    installation    doesn't    have    the    <tt>ipykernel</tt>    module    installed    on    it.    Without    this    module    is    not    possible    for    Spyder    to    create    a    console    for    you.<br><br>You    can    install    <tt>ipykernel</tt>    by    running    in    a    terminal:<br><br><tt>pip    install    ipykernel</tt><br><br>or<br><br><tt>conda    install    ipykernel</tt>"))
            return
    self.connect_client_to_kernel(client)
    if (client.shellwidget.kernel_manager is None):
        return
    self.register_client(client)
