class_docstr: Mixin for configurable classes that work with connection files
class_docstr_tok: ["Mixin","for","configurable","classes","that","work","with","connection","files"]
docstr: Cleanup ipc files if we wrote them.
docstr_tok: ["Cleanup","ipc","files","if","we","wrote","them","."]
code: def cleanup_ipc_files(self) -> None:
      """Cleanup ipc files if we wrote them."""
      if self.transport != "ipc":
          return
      for port in self.ports:
          ipcfile = "%s-%i" % (self.ip, port)
          try:
              os.remove(ipcfile)
          except OSError:
              pass
  
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 9 for calling the ConnectionFileMixin obj's underlying member method code with example usage: obj.cleanup_ipc_files() without return types