code: def generate(
          cls: Type[T], data: Generic, name: str = None, *, recursive: bool = True
      ) -> T:
          
          if name is None:
              name = cls.__name__
          kls = make_class(name, {k: ib(default=None) for k in data}, bases=(cls,))
          data = {
              k: (
                  cls.generate(v, k.title())
                  if recursive and isinstance(v, Mapping)
                  else v
              )
              for k, v in data.items()
          }
          return kls(**data)
docs: Build dataclasses and objects from dictionaries, recursively.