code: def format_model_and_field_name(model_name: str) -> str:
      parts = re.findall("[A-Z][^A-Z]*", model_name)
      if not parts:  # Check if the list is empty
          return model_name.lower().replace("_", "-")
      return "-".join(part.lower().replace("_", "-") for part in parts)
  
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 2 for calling a global function with example usage: format_model_and_field_name(model_name) and returns: str, model_name