class_docstr: Class that defines methods for generating code from schemas
  
  Parameters
  ----------
  classname : string
      The name of the class to generate
  schema : dict
      The dictionary defining the schema class
  rootschema : dict (optional)
      The root schema for the class
  basename : string or list of strings (default: "SchemaBase")
      The name(s) of the base class(es) to use in the class definition
  schemarepr : CodeSnippet or object, optional
      An object whose repr will be used in the place of the explicit schema.
      This can be useful, for example, when the generated code should reference
      a predefined schema object. The user must ensure that the schema within
      the evaluated code is identical to the schema used to generate the code.
  rootschemarepr : CodeSnippet or object, optional
      An object whose repr will be used in the place of the explicit root
      schema.
  altair_classes_prefix : string, optional
  **kwargs : dict
      Additional keywords for derived classes.
docstr: Generate code for a schema class
docstr_tok: ["Generate","code","for","a","schema","class"]
code: def schema_class(self) -> str:
      """Generate code for a schema class"""
      rootschema: dict = (
          self.rootschema
          if self.rootschema is not None
          else self.schema
      )
      schemarepr: object = (
          self.schemarepr
          if self.schemarepr is not None
          else self.schema
      )
      rootschemarepr = self.rootschemarepr
      if rootschemarepr is None:
          if rootschema is self.schema:
              rootschemarepr = CodeSnippet("_schema")
          else:
              rootschemarepr = rootschema
      if isinstance(self.basename, str):
          basename = self.basename
      else:
          basename = ", ".join(self.basename)
      return self.schema_class_template.format(
          classname=self.classname,
          basename=basename,
          schema=schemarepr,
          rootschema=rootschemarepr,
          docstring=self.docstring(indent=4),
          init_code=self.init_code(indent=4),
          method_code=self.method_code(indent=4),
          **self.kwargs,
      )
  
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 4 for calling the SchemaGenerator obj's underlying member method code with example usage: obj.schema_class() and returns: self