class_docstr: See documentation here
  
  https://wiki.yandex-team.ru/yatool/test/#python-acquire-ports
class_docstr_tok: ["See","documentation","here","https",":","\/\/wiki.yandex-team.ru\/yatool\/test\/","#","python-acquire-ports"]
code: def is_port_free(self, port, sock_type=socket.SOCK_STREAM):
      sock = socket.socket(socket.AF_INET6, sock_type)
      try:
          sock.bind(("::", port))
          sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
      except socket.error as e:
          if e.errno == errno.EADDRINUSE:
              return False
          raise
      finally:
          sock.close()
      return True
  
imports: import os
  import errno
  import socket
  import random
  import logging
  import platform
  import threading
  import six
label_desc: Use image node_id 15 for calling the PortManager obj's underlying member method code with example usage: obj.is_port_free(port, sock_type) and returns: True, False