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
  
imports: import os
  import socket
  from contextlib import contextmanager
  from io import BytesIO
  import numpy
  import pandas
  import pyarrow.fs
  import pytest
  from fsspec.core import get_fs_token_paths
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 2 for calling a global function with example usage: endpoint_port() and returns: port