
    ^i                         d Z ddlZdefdZy)z$Collective module related utilities.    Nreturnc                      t        j                   t         j                  t         j                        5 } | j                  d       | j	                         d   }ddd       |S # 1 sw Y   S xY w)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/hubwallet-dev/venv/lib/python3.12/site-packages/xgboost/testing/collective.pyget_avail_portr      s\     
v~~v'9'9	: 'f$%!!#A&' K' Ks   %A""A,)__doc__r   intr        r   <module>r      s    * 	 	r   