code: def _find_random_open_port() -> int:
      """Find a random open port on localhost."""
      with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
          s.bind(("", 0))
          port = s.getsockname()[1]
      return port
  
imports: import copy
  import io
  import socket
  import subprocess
  from concurrent.futures import ThreadPoolExecutor
  from pathlib import Path
  from typing import Any, Dict, Generator, List
  import numpy
  import pytest
  from sklearn.datasets import make_blobs, make_regression
  from sklearn.metrics import accuracy_score
label_desc: Use image node_id 2 for calling a global function with example usage: _find_random_open_port() and returns: port