code: def browse_weights(weights_dir, model="generator"):
      """Weights selection from cl."""
  
      exit = False
      while exit is False:
          weights = np.sort(os.listdir(weights_dir))[::-1]
          print_sel = dict(zip(np.arange(len(weights)), weights))
          for k in print_sel.keys():
              logger_message = "{item_n}: {item} \n".format(
                  item_n=k, item=print_sel[k]
              )
              logger.info(logger_message)
  
          sel = select_positive_integer(
              ">>> Select folder or weights for {}\n".format(model)
          )
          if weights[sel].endswith("hdf5"):
              weights_path = os.path.join(weights_dir, weights[sel])
              exit = True
          else:
              weights_dir = os.path.join(weights_dir, weights[sel])
      return weights_path
  
file_path: image-super-resolution/ISR/utils/utils.py
imports: import os
  import argparse
  from datetime import datetime
  import numpy
  import yaml
  from ISR.utils.logger import get_logger
label_desc: Use image node_id 11 for calling a global function with example usage: browse_weights(weights_dir, model) and returns: weights_path