code: def endpoint_port():
      # Return a free port per worker session.
      sock = socket.socket()
      sock.bind(("127.0.0.1", 0))
      port = sock.getsockname()[1]
      sock.close()
      return port
  
file_path: cudf/python/dask_cudf/dask_cudf/io/tests/test_s3.py
imports: import os
  import socket
  from contextlib import contextmanager
  from io import BytesIO
  import pandas
  import pyarrow.fs
  import pytest
  import dask_cudf
label_desc: Use image node_id 2 for calling a global function with example usage: endpoint_port() and returns: port