code: def fetch_example_model(model_name, backend="Vivado"):
      """
      Download an example model (and example data & configuration if available) from github repo to working directory,
      and return the corresponding configuration:
  
      https://github.com/fastmachinelearning/example-models
  
      Use fetch_example_list() to see all the available models.
  
      Args:
          model_name (str): Name of the example model in the repo. Example: fetch_example_model('KERAS_3layer.json')
          backend (str, optional): Name of the backend to use for model conversion.
  
      Return:
          dict: Dictionary that stores the configuration to the model
      """
  
      # Initialize the download link and model type
      download_link = f"https://raw.githubusercontent.com/{ORGANIZATION}/example-models/{BRANCH}/"
      model_type = None
      model_config = None
  
      # Check for model's type to update link
      if ".json" in model_name:
          model_type = "keras"
          model_config = "KerasJson"
      elif ".h5" in model_name:
          model_type = "keras"
          model_config = "KerasH5"
      elif ".pt" in model_name:
          model_type = "pytorch"
          model_config = "PytorchModel"
      elif ".onnx" in model_name:
          model_type = "onnx"
          model_config = "OnnxModel"
      elif ".pb" in model_name:
          model_type = "tensorflow"
          model_config = "TensorFlowModel"
      else:
          raise TypeError("Model type is not supported in hls4ml.")
  
      download_link_model = (
          download_link + model_type + "/" + model_name
      )
  
      # Download the example model
      print("Downloading example model files ...")
      urlretrieve(
          download_link_model,
          model_name,
      )
  
      # Check if the example data and configuration for the model are available
      if _data_is_available(model_name):
          _load_example_data(model_name)
  
      if _config_is_available(model_name):
          config = _load_example_config(model_name)
          config[
              model_config
          ] = model_name  # Ensure that paths are correct
      else:
          config = _create_default_config(
              model_name, model_config, backend
          )
  
      # If the model is a keras model then have to download its weight file as well
      if model_type == "keras" and ".json" in model_name:
          model_weight_name = model_name[:-5] + "_weights.h5"
  
          download_link_weight = (
              download_link + model_type + "/" + model_weight_name
          )
          urlretrieve(download_link_weight, model_weight_name)
  
          config[
              "KerasH5"
          ] = model_weight_name  # Set configuration for the weight file
  
      return config
  
file_path: hls4ml/hls4ml/utils/example_models.py
imports: import json
  import pprint
  from urllib.request import urlretrieve
  import yaml
  from .config import create_config
label_desc: Use image node_id 8 for calling a global function with example usage: fetch_example_model(model_name, backend) and returns: config