code: def get_args(info: SchemaInfo) -> ArgInfo:
      """Return the list of args & kwds for building the __init__ function"""
      # TODO: - set additional properties correctly
      #       - handle patternProperties etc.
      required: Set[str] = set()
      kwds: Set[str] = set()
      invalid_kwds: Set[str] = set()
  
      # TODO: specialize for anyOf/oneOf?
  
      if info.is_allOf():
          # recursively call function on all children
          arginfo = [get_args(child) for child in info.allOf]
          nonkeyword = all(args.nonkeyword for args in arginfo)
          required = set.union(
              set(), *(args.required for args in arginfo)
          )
          kwds = set.union(set(), *(args.kwds for args in arginfo))
          kwds -= required
          invalid_kwds = set.union(
              set(), *(args.invalid_kwds for args in arginfo)
          )
          additional = all(args.additional for args in arginfo)
      elif info.is_empty() or info.is_compound():
          nonkeyword = True
          additional = True
      elif info.is_value():
          nonkeyword = True
          additional = False
      elif info.is_object():
          invalid_kwds = {
              p for p in info.required if not is_valid_identifier(p)
          } | {p for p in info.properties if not is_valid_identifier(p)}
          required = {
              p for p in info.required if is_valid_identifier(p)
          }
          kwds = {p for p in info.properties if is_valid_identifier(p)}
          kwds -= required
          nonkeyword = False
          additional = True
          # additional = info.additionalProperties or info.patternProperties
      else:
          raise ValueError("Schema object not understood")
  
      return ArgInfo(
          nonkeyword=nonkeyword,
          required=required,
          kwds=kwds,
          invalid_kwds=invalid_kwds,
          additional=additional,
      )
  
imports: import re
  import textwrap
  from typing import Set, Final, Optional, List, Union, Dict, Tuple
  from dataclasses import dataclass
  from .utils import SchemaInfo, is_valid_identifier, indent_docstring, jsonschema_to_python_types, flatten
label_desc: Use image node_id 1 for calling a global function with example usage: get_args(info) and returns: ArgInfo