class_docstr: Mixin for configurable classes that work with connection files
class_docstr_tok: ["Mixin","for","configurable","classes","that","work","with","connection","files"]
docstr: Load connection info from a dict containing connection info.
  
  Typically this data comes from a connection file
  and is called by load_connection_file.
  
  Parameters
  ----------
  info: dict
      Dictionary containing connection_info.
      See the connection_file spec for details.
docstr_tok: ["Load","connection","info","from","a","dict","containing","connection","info",".","Typically","this","data","comes","from","a","connection","file","and","is","called","by","load_connection_file",".","Parameters","--","--","--","--","--","info",":","dict","Dictionary","containing","connection_info",".","See","the","connection_file","spec","for","details","."]
code: def load_connection_info(self, info: KernelConnectionInfo) -> None:
      """Load connection info from a dict containing connection info.
  
      Typically this data comes from a connection file
      and is called by load_connection_file.
  
      Parameters
      ----------
      info: dict
          Dictionary containing connection_info.
          See the connection_file spec for details.
      """
      self.transport = info.get("transport", self.transport)
      self.ip = info.get(
          "ip", self._ip_default()
      )  # type:ignore[assignment]
  
      self._record_random_port_names()
      for name in port_names:
          if getattr(self, name) == 0 and name in info:
              # not overridden by config or cl_args
              setattr(self, name, info[name])
  
      if "key" in info:
          key = info["key"]
          if isinstance(key, str):
              key = key.encode()
          assert isinstance(key, bytes)
  
          self.session.key = key
      if "signature_scheme" in info:
          self.session.signature_scheme = info["signature_scheme"]
  
imports: from __future__ import annotations
  import errno
  import glob
  import json
  import os
  import socket
  import stat
  import tempfile
  import warnings
  from getpass import getpass
  from typing import TYPE_CHECKING, Any, Dict, Union, cast
  import zmq
  from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
  from traitlets import Bool, CaselessStrEnum, Instance, Integer, Type, Unicode, observe
  from traitlets.config import LoggingConfigurable, SingletonConfigurable
  from .localinterfaces import localhost
  from .utils import _filefind
label_desc: Use image node_id 14 for calling the ConnectionFileMixin obj's underlying member method code with example usage: obj.load_connection_info(info) without return types