code: def generate_gbnf_grammar_and_documentation(
      pydantic_model_list,
      outer_object_name: str = None,
      outer_object_content: str = None,
      model_prefix: str = "Output Model",
      fields_prefix: str = "Output Fields",
      list_of_outputs: bool = False,
      documentation_with_field_description=True,
  ):
      """
      Generate GBNF grammar and documentation for a list of Pydantic models.
  
      Args:
          pydantic_model_list: List of Pydantic model classes.
          outer_object_name (str): Outer object name for the GBNF grammar. If None, no outer object will be generated. Eg. "function" for function calling.
          outer_object_content (str): Content for the outer rule in the GBNF grammar. Eg. "function_parameters" or "params" for function calling.
          model_prefix (str): Prefix for the model section in the documentation.
          fields_prefix (str): Prefix for the fields section in the documentation.
          list_of_outputs (bool): Whether the output is a list of items.
          documentation_with_field_description (bool): Include field descriptions in the documentation.
  
      Returns:
          tuple: GBNF grammar string, documentation string.
      """
      documentation = generate_markdown_documentation(
          copy(pydantic_model_list),
          model_prefix,
          fields_prefix,
          documentation_with_field_description=documentation_with_field_description,
      )
      grammar = generate_gbnf_grammar_from_pydantic_models(
          pydantic_model_list,
          outer_object_name,
          outer_object_content,
          list_of_outputs,
      )
      grammar = remove_empty_lines(
          grammar + get_primitive_grammar(grammar)
      )
      return grammar, documentation
  
imports: import inspect
  import json
  from copy import copy
  from inspect import isclass, getdoc
  from types import NoneType
  from docstring_parser import parse
  from pydantic import BaseModel, create_model, Field
  from typing import Any, Type, List, get_args, get_origin, Tuple, Union, Optional, _GenericAlias
  from enum import Enum
  from typing import get_type_hints, Callable
  import re
  from enum import Enum
label_desc: Use image node_id 21 for calling a global function with example usage: generate_gbnf_grammar_and_documentation(pydantic_model_list, outer_object_name, outer_object_content, model_prefix, fields_prefix, list_of_outputs, documentation_with_field_description) and returns: grammar,  documentation