code: def generate_params_docstring(func_name, params, doc_items):
      """
      Generates the parameters docstring for a function.
  
      Raises
      ------
      Exception
          If any attribute is not found in the documentation items.
      """
      param_strings = []
      for param, default in params.items():
          if param not in doc_items:
              raise Exception(
                  f"Parameter {param} not found in param file for function {func_name}"
              )
  
          optional = ", optional" if default != NO_DEFAULT else ""
          default_str = (
              f" Default is {default}." if default != NO_DEFAULT else ""
          )
          wrapped_desp = wrap_text(
              f"{doc_items[param]['desp']}{default_str}"
          )
          param_strings.append(
              f"{param} : {doc_items[param]['type']}{optional}\n{wrapped_desp}"
          )
  
      return "\nParameters\n----------\n" + "\n".join(param_strings)
  
imports: import ast
  import json
  import re
  import argparse
  import textwrap
  import os
  from collections import defaultdict
label_desc: Use image node_id 3 for calling a global function with example usage: generate_params_docstring(func_name, params, doc_items) and returns: unknown