code: def get_random_port():
      old_state = random.getstate()
      random.seed()
      port = random.randint(10000, 20000)
      random.setstate(old_state)
      return port
  
file_path: mmf/tools/sweeps/lib/slurm.py
imports: import datetime
  import itertools
  import os
  import random
  import shlex
  import shutil
  import subprocess
  from collections import OrderedDict
  from glob import glob
  from mmf.utils.general import get_mmf_root
label_desc: Use image node_id 7 for calling a global function with example usage: get_random_port() and returns: port