code: def release_port(ctx):
      """Closes the temporary socket created to assign a port to the TF node."""
      if ctx.tmp_socket is not None:
          logger.info(
              "Releasing assigned port: {}".format(
                  ctx.tmp_socket.getsockname()
              )
          )
          ctx.tmp_socket.close()
          ctx.tmp_socket = None
      else:
          logger.warning("release_port() invoked with no bound socket.")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import nested_scopes
  from __future__ import print_function
  import getpass
  import logging
  import pkg_resources
  from packaging import version
  from six.moves.queue import Empty
  from .None import compat, marker
label_desc: Use image node_id 5 for calling a global function with example usage: release_port(ctx) without return types