code: def generate_list_rule(element_type):
      """
      Generate a GBNF rule for a list of a given element type.
  
      :param element_type: The type of the elements in the list (e.g., 'string').
      :return: A string representing the GBNF rule for a list of the given type.
      """
      rule_name = f"{map_pydantic_type_to_gbnf(element_type)}-list"
      element_rule = map_pydantic_type_to_gbnf(element_type)
      list_rule = rf'{rule_name} ::= "["  {element_rule} (","  {element_rule})* "]"'
      return list_rule
  
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 3 for calling a global function with example usage: generate_list_rule(element_type) and returns: list_rule