
    sii                         d Z ddlZdefdZdS )z$Collective module related utilities.    Nreturnc                      t          j         t           j        t           j                  5 } |                     d           |                                 d         }ddd           n# 1 swxY w Y   |S )zReturns a port that's available during the function call. It doesn't prevent the
    port from being used after the function returns as we can't reserve the port. The
    utility makes a test more likely to pass.

    )z	127.0.0.1r      N)socketAF_INETSOCK_STREAMbindgetsockname)serverports     `/var/www/html/bet.cuttalo.com/ml/venv/lib/python3.11/site-packages/xgboost/testing/collective.pyget_avail_portr      s     
v~v'9	:	: 'f$%%%!!##A&' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Ks   0A&&A*-A*)__doc__r   intr        r   <module>r      s9    * * 	 	 	 	 	 	 	r   