code: def classify_definition(enums: dict, name: str, schema: dict):
      path = name
      if "enum" in schema:
          if schema["type"] == "string":
              members = schema["enum"]
              description = schema.get("description", "")
              title = schema.get("title", "")
              # title is always set to the enum's name if it's unused thus
              # for augmenting description we assume it as empty if it's a single word.
              title = title if " " in title else ""
              if description and title:
                  description = title + "\n" + description
              elif title:
                  description = title
              return Enum(name, members, description or None)
          raise ValueError(
              "unhandled enum type ({schema['type']}): {schema}"
          )
  
      if schema["type"] == "object":
          # top-level named objects should be classes, not typed dictionaries:
          assert "additionalProperties" not in schema, (name, schema)
          required = set(schema.get("required", []))
          members = {
              k: Parameter(
                  name=k,
                  type=classify_type(enums, f"{path}.{k}", v),
                  required=(k in required),
                  where="definitions",
                  serialized_name=None,
                  title=v.get("title") or v.get("description"),
              )
              for k, v in schema.get("properties", {}).items()
          }
          description = schema.get("description")
          return Class(name, members, description)
      raise ValueError(f"unhandled schema: {schema} @ {path}")
  
imports: import json
  import logging
  import sys
  import typing
  from dataclasses import dataclass, field
  import typing_extensions
label_desc: Use image node_id 3 for calling a global function with example usage: classify_definition(enums, name, schema) and returns: Class, Enum