code: def find_port():
      """Find a port which is free"""
      port = random.randint(10000, 20000)
      while detect_port(port):
          port = random.randint(10000, 20000)
      return port
  
file_path: nni/test/training_service/nnitest/remote_docker.py
imports: import os
  import argparse
  from subprocess import check_output, check_call
  import socket
  import random
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: find_port() and returns: port